Test: ZADD CH tests

This commit is contained in:
antirez 2015-05-29 11:34:43 +02:00
parent d8a8dca7fd
commit 39b49bcaaf
1 changed files with 7 additions and 0 deletions

View File

@ -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}