summaryrefslogtreecommitdiff
path: root/tests/unit/type/hash.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/type/hash.tcl')
-rw-r--r--tests/unit/type/hash.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/type/hash.tcl b/tests/unit/type/hash.tcl
index ae5677383..fcb42e81e 100644
--- a/tests/unit/type/hash.tcl
+++ b/tests/unit/type/hash.tcl
@@ -71,6 +71,11 @@ start_server {tags {"hash"}} {
r hrandfield myhash 0
} {}
+ test "HRANDFIELD count overflow" {
+ r hmset myhash a 1
+ assert_error {*value is out of range*} {r hrandfield myhash -9223372036854770000 withvalues}
+ } {}
+
test "HRANDFIELD with <count> against non existing key" {
r hrandfield nonexisting_key 100
} {}