summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-10-30 11:36:12 +0100
committerantirez <antirez@gmail.com>2013-10-30 11:36:12 +0100
commit5fdb94fd98dcd9e4a73bcf24b03c97923058a0d1 (patch)
tree9de9abdd8f7bd091039679e1d902854e2afc2385 /tests
parenta881827b6ed3db807fb0d4a7f60765d34600aec2 (diff)
downloadredis-5fdb94fd98dcd9e4a73bcf24b03c97923058a0d1.tar.gz
SCAN test keys sorting turned into more idiomatic Tcl.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/scan.tcl12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/scan.tcl b/tests/unit/scan.tcl
index 275a4d656..af4bb7667 100644
--- a/tests/unit/scan.tcl
+++ b/tests/unit/scan.tcl
@@ -9,11 +9,11 @@ start_server {tags {"scan"}} {
set res [r scan $cur]
set cur [lindex $res 0]
set k [lindex $res 1]
- lappend keys $k
+ lappend keys {*}$k
if {$cur == 0} break
}
- set keys [lsort -unique [concat {*}$keys]]
+ set keys [lsort -unique $keys]
assert_equal 1000 [llength $keys]
}
@@ -27,11 +27,11 @@ start_server {tags {"scan"}} {
set res [r scan $cur count 5]
set cur [lindex $res 0]
set k [lindex $res 1]
- lappend keys $k
+ lappend keys {*}$k
if {$cur == 0} break
}
- set keys [lsort -unique [concat {*}$keys]]
+ set keys [lsort -unique $keys]
assert_equal 1000 [llength $keys]
}
@@ -45,11 +45,11 @@ start_server {tags {"scan"}} {
set res [r scan $cur match "key:1??"]
set cur [lindex $res 0]
set k [lindex $res 1]
- lappend keys $k
+ lappend keys {*}$k
if {$cur == 0} break
}
- set keys [lsort -unique [concat {*}$keys]]
+ set keys [lsort -unique $keys]
assert_equal 100 [llength $keys]
}
}