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.
This commit is contained in:
BigCat 2011-12-19 19:45:57 +08:00
parent 706b32e0e0
commit f54c299091

View File

@ -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]
}