]> git.saurik.com Git - redis.git/blobdiff - tests/unit/type/hash.tcl
testhelp.h now exits with retcode 1 on failed tests.
[redis.git] / tests / unit / type / hash.tcl
index 9b043d3f3c3614f8f8154922a1c36dc4bd7dbacc..718bc04ad3a98988cc09c4e91c59965f7baba362 100644 (file)
@@ -235,6 +235,13 @@ start_server {tags {"hash"}} {
         r hgetall myhash
     } {b 2}
 
+    test {HDEL - hash becomes empty before deleting all specified fields} {
+        r del myhash
+        r hmset myhash a 1 b 2 c 3
+        assert_equal 3 [r hdel myhash a b c d e]
+        assert_equal 0 [r exists myhash]
+    }
+
     test {HEXISTS} {
         set rv {}
         set k [lindex [array names smallhash *] 0]