Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
7ac6d461
Commit
7ac6d461
authored
Apr 28, 2009
by
antirez
Browse files
GETSET tests
parent
a431eb74
Changes
2
Show whitespace changes
Inline
Side-by-side
client-libraries/tcl/redis.tcl
View file @
7ac6d461
...
...
@@ -19,7 +19,7 @@ array set ::redis::bulkarg {}
# Flag commands requiring last argument as a bulk write operation
foreach redis_bulk_cmd
{
set setnx rpush lpush lset lrem sadd srem sismember echo
set setnx rpush lpush lset lrem sadd srem sismember echo
getset
}
{
set ::redis::bulkarg
(
$redis
_bulk_cmd
)
{}
}
...
...
test-redis.tcl
View file @
7ac6d461
...
...
@@ -646,6 +646,15 @@ proc main {server port} {
$r randomkey
}
{}
test
{
GETSET
(
set new value
)}
{
list
[
$r
getset foo xyz
]
[
$r
get foo
]
}
{{}
xyz
}
test
{
GETSET
(
replace old value
)}
{
$r set foo bar
list
[
$r
getset foo xyz
]
[
$r
get foo
]
}
{
bar xyz
}
# Leave the user with a clean DB before to exit
test
{
FLUSHALL
}
{
$r flushall
...
...
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