diff options
author | antirez <antirez@gmail.com> | 2011-05-31 20:30:54 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2011-05-31 20:34:02 +0200 |
commit | 83533b622e008d089ee90e499966bbf49826a734 (patch) | |
tree | 6646c2ce8dfc5bc2c41e7708e8d401780228650e /tests | |
parent | 913090ec6370c7dba8beb478c4876c1fc4e60036 (diff) | |
download | redis-83533b622e008d089ee90e499966bbf49826a734.tar.gz |
ZREM tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/type/zset.tcl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/type/zset.tcl b/tests/unit/type/zset.tcl index 761cac49c..20313133d 100644 --- a/tests/unit/type/zset.tcl +++ b/tests/unit/type/zset.tcl @@ -65,6 +65,21 @@ start_server {tags {"zset"}} { assert_equal 0 [r exists ztmp] } + test "ZREM variadic version" { + r del ztmp + r zadd ztmp 10 a 20 b 30 c + assert_equal 2 [r zrem ztmp x y a b k] + assert_equal 0 [r zrem ztmp foo bar] + assert_equal 1 [r zrem ztmp c] + r exists ztmp + } {0} + + test "ZREM variadic version -- remove elements after key deletion" { + r del ztmp + r zadd ztmp 10 a 20 b 30 c + r zrem ztmp a b c d e f g + } {3} + test "ZRANGE basics - $encoding" { r del ztmp r zadd ztmp 1 a |