diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/type/string.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/type/string.tcl b/tests/unit/type/string.tcl index a9fa894dc..b25a14f4c 100644 --- a/tests/unit/type/string.tcl +++ b/tests/unit/type/string.tcl @@ -234,6 +234,15 @@ start_server {tags {"string"}} { list [r msetnx x1{t} xxx y2{t} yyy] [r get x1{t}] [r get y2{t}] } {1 xxx yyy} + test {MSETNX with not existing keys - same key twice} { + r del x1{t} + list [r msetnx x1{t} xxx x1{t} yyy] [r get x1{t}] + } {1 yyy} + + test {MSETNX with already existing keys - same key twice} { + list [r msetnx x1{t} xxx x1{t} zzz] [r get x1{t}] + } {0 yyy} + test "STRLEN against non-existing key" { assert_equal 0 [r strlen notakey] } |