Skip to content

Commit

Permalink
Test: ZADD CH tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed May 29, 2015
1 parent 1d8973c commit 0da4531
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit/type/zset.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 0da4531

Please sign in to comment.