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
b002546b
Commit
b002546b
authored
May 31, 2011
by
antirez
Browse files
ZREM tests
parent
3f7b2b1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/type/zset.tcl
View file @
b002546b
...
@@ -93,6 +93,21 @@ start_server {tags {"zset"}} {
...
@@ -93,6 +93,21 @@ start_server {tags {"zset"}} {
assert_equal 0
[
r exists ztmp
]
assert_equal 0
[
r exists ztmp
]
}
}
test
"ZREM variadic version"
{
r del ztmp
r zadd ztmp 10 a 20 b 30 c
assert_equal 2
[
r zrem ztmp x y a b k
]
assert_equal 0
[
r zrem ztmp foo bar
]
assert_equal 1
[
r zrem ztmp c
]
r exists ztmp
}
{
0
}
test
"ZREM variadic version -- remove elements after key deletion"
{
r del ztmp
r zadd ztmp 10 a 20 b 30 c
r zrem ztmp a b c d e f g
}
{
3
}
test
"ZRANGE basics -
$encoding
"
{
test
"ZRANGE basics -
$encoding
"
{
r del ztmp
r del ztmp
r zadd ztmp 1 a
r zadd ztmp 1 a
...
...
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