X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/75398fbcae19a52ea21c518f5f0fd1e6668edcd3..8c4d91fcf8624ebff4434d259c19046fdd13240d:/test-redis.tcl diff --git a/test-redis.tcl b/test-redis.tcl index 6eb1468c..bd58cb2e 100644 --- a/test-redis.tcl +++ b/test-redis.tcl @@ -65,6 +65,13 @@ proc main {server port} { $r get x } {} + test {Vararg DEL} { + $r set foo1 a + $r set foo2 b + $r set foo3 c + list [$r del foo1 foo2 foo3 foo4] [$r mget foo1 foo2 foo3] + } {3 {{} {} {}}} + test {KEYS with pattern} { foreach key {key_x key_y key_z foo_a foo_b foo_c} { $r set $key hello @@ -491,6 +498,23 @@ proc main {server port} { lsort [$r sunion nokey1 set1 set2 nokey2] } [lsort -uniq "[$r smembers set1] [$r smembers set2]"] + test {SDIFF with two sets} { + for {set i 5} {$i < 1000} {incr i} { + $r sadd set4 $i + } + lsort [$r sdiff set1 set4] + } {0 1 2 3 4} + + test {SDIFF with three sets} { + $r sadd set5 0 + lsort [$r sdiff set1 set4 set5] + } {1 2 3 4} + + test {SDIFFSTORE with three sets} { + $r sdiffstore sres set1 set4 set5 + lsort [$r smembers sres] + } {1 2 3 4} + test {SAVE - make sure there are all the types as values} { $r lpush mysavelist hello $r lpush mysavelist world