summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-09-14 12:35:51 +0200
committerantirez <antirez@gmail.com>2015-09-14 12:37:13 +0200
commita0ff29bcf26760f0e13f3368bd83b008ba616558 (patch)
treeec9b0c24fb26278aea562de778bacfda02b68116
parente2c0d8966253e11435e2273ab199f13a017207d3 (diff)
downloadredis-a0ff29bcf26760f0e13f3368bd83b008ba616558.tar.gz
Test: MOVE expire test improved.
Related to #2765.
-rw-r--r--tests/unit/basic.tcl13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/basic.tcl b/tests/unit/basic.tcl
index 99bc1b85b..a46b27401 100644
--- a/tests/unit/basic.tcl
+++ b/tests/unit/basic.tcl
@@ -446,6 +446,19 @@ start_server {tags {"basic"}} {
r select 9
}
+ test {MOVE does not create an expire if it does not exist} {
+ r select 10
+ r flushdb
+ r select 9
+ r set mykey foo
+ r move mykey 10
+ assert {[r ttl mykey] == -2}
+ r select 10
+ assert {[r ttl mykey] == -1}
+ assert {[r get mykey] eq "foo"}
+ r select 9
+ }
+
test {SET/GET keys in different DBs} {
r set a hello
r set b world