]> git.saurik.com Git - redis.git/commitdiff
Added an SMOVE test where src and dest key are the same.
authorantirez <antirez@gmail.com>
Wed, 18 Apr 2012 16:00:12 +0000 (18:00 +0200)
committerantirez <antirez@gmail.com>
Wed, 18 Apr 2012 19:23:07 +0000 (21:23 +0200)
tests/unit/type/set.tcl

index bdd1f9bfa11955a2026ccb9caad974204126267a..45239aa9e35d223a9b98e30ca04c1e2436507cff 100644 (file)
@@ -317,6 +317,13 @@ start_server {
         assert_error "ERR*wrong kind*" {r smove myset2 x foo}
     }
 
+    test "SMOVE with identical source and destination" {
+        r del set
+        r sadd set a b c
+        r smove set set b
+        lsort [r smembers set]
+    } {a b c}
+
     tags {slow} {
         test {intsets implementation stress testing} {
             for {set j 0} {$j < 20} {incr j} {