Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ZREM tests

  • Loading branch information...
commit 83533b622e008d089ee90e499966bbf49826a734 1 parent 913090e
@antirez authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/unit/type/zset.tcl
View
15 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
Please sign in to comment.
Something went wrong with that request. Please try again.