1
0

zset.tcl 477 B

12345678910111213141516
  1. set testmodule [file normalize tests/modules/zset.so]
  2. start_server {tags {"modules"}} {
  3. r module load $testmodule
  4. test {Module zset rem} {
  5. r del k
  6. r zadd k 100 hello 200 world
  7. assert_equal 1 [r zset.rem k hello]
  8. assert_equal 0 [r zset.rem k hello]
  9. assert_equal 1 [r exists k]
  10. # Check that removing the last element deletes the key
  11. assert_equal 1 [r zset.rem k world]
  12. assert_equal 0 [r exists k]
  13. }
  14. }