diff options
author | antirez <antirez@gmail.com> | 2015-05-29 11:34:43 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-05-29 11:34:43 +0200 |
commit | 39b49bcaaf221d9d8bd6ca62fe1ea0befe4089fd (patch) | |
tree | 99699db3008a9ea30979b7b38bc1e94c5548506f | |
parent | d8a8dca7fd52d6be8383b2a0d2b7e403f3c1d71d (diff) | |
download | redis-zaddnx.tar.gz |
Test: ZADD CH testszaddnx
-rw-r--r-- | tests/unit/type/zset.tcl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/type/zset.tcl b/tests/unit/type/zset.tcl index ea2d4e374..cc5601439 100644 --- a/tests/unit/type/zset.tcl +++ b/tests/unit/type/zset.tcl @@ -114,6 +114,13 @@ start_server {tags {"zset"}} { set err } {ERR*} + test "ZADD CH option changes return value to all changed elements" { + r del ztmp + r zadd ztmp 10 x 20 y 30 z + assert {[r zadd ztmp 11 x 21 y 30 z] == 0} + assert {[r zadd ztmp ch 12 x 22 y 30 z] == 2} + } + test "ZINCRBY calls leading to NaN result in error" { r zincrby myzset +inf abc assert_error "*NaN*" {r zincrby myzset -inf abc} |