Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
7d5f5712
Commit
7d5f5712
authored
Dec 15, 2010
by
Pieter Noordhuis
Browse files
Update tests for STRLEN
parent
ad1b4f4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/basic.tcl
View file @
7d5f5712
...
@@ -361,18 +361,18 @@ start_server {tags {"basic"}} {
...
@@ -361,18 +361,18 @@ start_server {tags {"basic"}} {
list
[
r msetnx x1 xxx y2 yyy
]
[
r get x1
]
[
r get y2
]
list
[
r msetnx x1 xxx y2 yyy
]
[
r get x1
]
[
r get y2
]
}
{
1 xxx yyy
}
}
{
1 xxx yyy
}
test
{
STRLEN against non
existing key
}
{
test
"
STRLEN against non
-
existing key
"
{
r strlen notakey
assert_equal 0
[
r strlen notakey
]
}
{
0
}
}
test
{
STRLEN against integer
}
{
test
"
STRLEN against integer
-encoded value"
{
r set myinteger -555
r set myinteger -555
r strlen myinteger
assert_equal 4
[
r strlen myinteger
]
}
{
4
}
}
test
{
STRLEN against plain string
}
{
test
"
STRLEN against plain string
"
{
r set mystring
"foozzz0123456789 baz"
r set mystring
"foozzz0123456789 baz"
r strlen mystring
assert_equal 20
[
r strlen mystring
]
}
}
test
"SETBIT against non-existing key"
{
test
"SETBIT against non-existing key"
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment