Commit 23ba5c10 authored by antirez's avatar antirez
Browse files

Test: ZADD INCR test

parent 910e72d1
......@@ -100,6 +100,20 @@ start_server {tags {"zset"}} {
assert {[r zscore ztmp b] == 200}
}
test "ZADD INCR works like ZINCRBY" {
r del ztmp
r zadd ztmp 10 x 20 y 30 z
r zadd ztmp INCR 15 x
assert {[r zscore ztmp x] == 25}
}
test "ZADD INCR works with a single score-elemenet pair" {
r del ztmp
r zadd ztmp 10 x 20 y 30 z
catch {r zadd ztmp INCR 15 x 10 y} err
set err
} {ERR*}
test "ZINCRBY calls leading to NaN result in error" {
r zincrby myzset +inf abc
assert_error "*NaN*" {r zincrby myzset -inf abc}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment