GETSET tests

This commit is contained in:
antirez
2009-04-28 16:21:16 +02:00
parent a431eb74ba
commit 7ac6d4613f
2 changed files with 10 additions and 1 deletions

View File

@ -646,6 +646,15 @@ proc main {server port} {
$r randomkey
} {}
test {GETSET (set new value)} {
list [$r getset foo xyz] [$r get foo]
} {{} xyz}
test {GETSET (replace old value)} {
$r set foo bar
list [$r getset foo xyz] [$r get foo]
} {bar xyz}
# Leave the user with a clean DB before to exit
test {FLUSHALL} {
$r flushall