summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-15 11:49:39 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-15 11:49:39 +0100
commit7d5f5712d948b19d0778e4ef53a27d213aff7bdc (patch)
tree067177eeba8c6066370cbc379a0dfba540068abc
parentad1b4f4f59e653ac310ee0afb847daeb4f19fbfd (diff)
downloadredis-7d5f5712d948b19d0778e4ef53a27d213aff7bdc.tar.gz
Update tests for STRLEN
-rw-r--r--tests/unit/basic.tcl16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/basic.tcl b/tests/unit/basic.tcl
index a9b25fcec..5098b0109 100644
--- a/tests/unit/basic.tcl
+++ b/tests/unit/basic.tcl
@@ -361,18 +361,18 @@ start_server {tags {"basic"}} {
list [r msetnx x1 xxx y2 yyy] [r get x1] [r get y2]
} {1 xxx yyy}
- test {STRLEN against non existing key} {
- r strlen notakey
- } {0}
+ test "STRLEN against non-existing key" {
+ assert_equal 0 [r strlen notakey]
+ }
- test {STRLEN against integer} {
+ test "STRLEN against integer-encoded value" {
r set myinteger -555
- r strlen myinteger
- } {4}
+ assert_equal 4 [r strlen myinteger]
+ }
- test {STRLEN against plain string} {
+ test "STRLEN against plain string" {
r set mystring "foozzz0123456789 baz"
- r strlen mystring
+ assert_equal 20 [r strlen mystring]
}
test "SETBIT against non-existing key" {