X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/64a13a36e685c318319a70b775f91f2c34bcc34f..a54806ac6af77940070a90a44b603bec46cfe599:/tests/unit/type/hash.tcl diff --git a/tests/unit/type/hash.tcl b/tests/unit/type/hash.tcl index 9b043d3f..718bc04a 100644 --- a/tests/unit/type/hash.tcl +++ b/tests/unit/type/hash.tcl @@ -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]