Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
f54c2990
Commit
f54c2990
authored
Dec 19, 2011
by
BigCat
Browse files
I found that no test will fail even if I broke the `SORT x LIMIT y z` code.
Added a naive unit test for SORT-LIMIT command.
parent
706b32e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/sort.tcl
View file @
f54c2990
...
...
@@ -50,6 +50,10 @@ start_server {
assert_equal $result
[
r sort tosort BY weight_*
]
}
test
"
$title:
SORT BY key with limit"
{
assert_equal
[
lrange $result 5 9
]
[
r sort tosort BY weight_* LIMIT 5 5
]
}
test
"
$title:
SORT BY hash field"
{
assert_equal $result
[
r sort tosort BY wobj_*->weight
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment