diff options
Diffstat (limited to 'tests/unit/basic.tcl')
-rw-r--r-- | tests/unit/basic.tcl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/unit/basic.tcl b/tests/unit/basic.tcl index b0b3b9bac..fec0df5ec 100644 --- a/tests/unit/basic.tcl +++ b/tests/unit/basic.tcl @@ -368,7 +368,18 @@ start_server {tags {"basic"}} { format $err } {ERR*} - test {RENAME where source and dest key is the same} { + test {RENAME where source and dest key are the same (existing)} { + r set mykey foo + r rename mykey mykey + } {OK} + + test {RENAMENX where source and dest key are the same (existing)} { + r set mykey foo + r renamenx mykey mykey + } {0} + + test {RENAME where source and dest key are the same (non existing)} { + r del mykey catch {r rename mykey mykey} err format $err } {ERR*} |