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
a93f8f09
Commit
a93f8f09
authored
Jul 13, 2018
by
antirez
Browse files
Test: XDEL basic test.
parent
d4182a0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/type/stream.tcl
View file @
a93f8f09
...
@@ -234,6 +234,18 @@ start_server {
...
@@ -234,6 +234,18 @@ start_server {
assert
{[
lindex $res 0 1 1 1
]
eq
{
field two
}}
assert
{[
lindex $res 0 1 1 1
]
eq
{
field two
}}
}
}
test
{
XDEL basic test
}
{
r del somestream
r xadd somestream * foo value0
set id
[
r xadd somestream * foo value1
]
r xadd somestream * foo value2
r xdel somestream $id
assert
{[
r xlen somestream
]
== 2
}
set result
[
r xrange somestream - +
]
assert
{[
lindex $result 0 1 1
]
eq
{
value0
}}
assert
{[
lindex $result 1 1 1
]
eq
{
value2
}}
}
test
{
XRANGE fuzzing
}
{
test
{
XRANGE fuzzing
}
{
set low_id
[
lindex $items 0 0
]
set low_id
[
lindex $items 0 0
]
set high_id
[
lindex $items end 0
]
set high_id
[
lindex $items end 0
]
...
...
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