X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/ebd85e9a455df689c9be02a93354f580df4cafd8..0f9997845af236097c8802771cca3cff84c4e77b:/tests/unit/type/hash.tcl diff --git a/tests/unit/type/hash.tcl b/tests/unit/type/hash.tcl index 141971a8..47e10caa 100644 --- a/tests/unit/type/hash.tcl +++ b/tests/unit/type/hash.tcl @@ -318,6 +318,14 @@ start_server {tags {"hash"}} { lappend rv [string match "ERR*not an integer*" $bigerr] } {1 1} + test {HINCRBY can detect overflows} { + set e {} + r hset hash n -9223372036854775484 + assert {[r hincrby hash n -1] == -9223372036854775485} + catch {r hincrby hash n -10000} e + set e + } {*overflow*} + test {HINCRBYFLOAT against non existing database key} { r del htest list [r hincrbyfloat htest foo 2.5]