summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-04-18 18:00:12 +0200
committerantirez <antirez@gmail.com>2012-04-18 21:23:07 +0200
commitff5e31f74bbe41fd08f5e975ee1cde9bf7e44cce (patch)
tree98deed566c6906dd8fc4ec03d9e173b70d9ee506 /tests
parent24982f2bbcbff24b0101dd14090c9c4f0bfe9420 (diff)
downloadredis-ff5e31f74bbe41fd08f5e975ee1cde9bf7e44cce.tar.gz
Added an SMOVE test where src and dest key are the same.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/type/set.tcl7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/type/set.tcl b/tests/unit/type/set.tcl
index bdd1f9bfa..45239aa9e 100644
--- a/tests/unit/type/set.tcl
+++ b/tests/unit/type/set.tcl
@@ -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} {