Commit 74354cee authored by antirez's avatar antirez
Browse files

Test: fixes a few tests after basic unit refactoring.

parent 27c30b0e
...@@ -38,6 +38,7 @@ start_server {tags {"string"}} { ...@@ -38,6 +38,7 @@ start_server {tags {"string"}} {
} {} } {}
test {SET 10000 numeric keys and access all them in reverse order} { test {SET 10000 numeric keys and access all them in reverse order} {
r flushdb
set err {} set err {}
for {set x 0} {$x < 10000} {incr x} { for {set x 0} {$x < 10000} {incr x} {
r set $x $x r set $x $x
...@@ -53,9 +54,9 @@ start_server {tags {"string"}} { ...@@ -53,9 +54,9 @@ start_server {tags {"string"}} {
set _ $err set _ $err
} {} } {}
test {DBSIZE should be 10101 now} { test {DBSIZE should be 10000 now} {
r dbsize r dbsize
} {10101} } {10000}
} }
test "SETNX target key missing" { test "SETNX target key missing" {
...@@ -119,6 +120,7 @@ start_server {tags {"string"}} { ...@@ -119,6 +120,7 @@ start_server {tags {"string"}} {
} {BAR {} FOO {}} } {BAR {} FOO {}}
test {GETSET (set new value)} { test {GETSET (set new value)} {
r del foo
list [r getset foo xyz] [r get foo] list [r getset foo xyz] [r get foo]
} {{} xyz} } {{} xyz}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment