X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/c14753cea16cc963363b0d3002dc94b33c1f2075..b2a7fd0cf7afef7e7ede9e46a317fcb9ae84768c:/tests/unit/type/hash.tcl diff --git a/tests/unit/type/hash.tcl b/tests/unit/type/hash.tcl index 0d08cc55..8559dc3c 100644 --- a/tests/unit/type/hash.tcl +++ b/tests/unit/type/hash.tcl @@ -1,4 +1,4 @@ -start_server default.conf {} { +start_server {tags {"hash"}} { test {HSET/HLEN - Small hash creation} { array set smallhash {} for {set i 0} {$i < 8} {incr i} { @@ -15,8 +15,8 @@ start_server default.conf {} { } {8} test {Is the small hash encoded with a zipmap?} { - r debug object smallhash - } {*zipmap*} + assert_encoding zipmap smallhash + } test {HSET/HLEN - Big hash creation} { array set bighash {} @@ -34,8 +34,8 @@ start_server default.conf {} { } {1024} test {Is the big hash encoded with a zipmap?} { - r debug object bighash - } {*hashtable*} + assert_encoding hashtable bighash + } test {HGET against the small hash} { set err {} @@ -140,6 +140,11 @@ start_server default.conf {} { set _ $rv } {{{} {}} {{} {}} {{} {}}} + test {HMGET against wrong type} { + r set wrongtype somevalue + assert_error "*wrong*" {r hmget wrongtype field1 field2} + } + test {HMGET - small hash} { set keys {} set vals {}