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
516977de
Commit
516977de
authored
Mar 17, 2010
by
antirez
Browse files
better HSET test
parent
2069d06a
Changes
1
Hide whitespace changes
Inline
Side-by-side
test-redis.tcl
View file @
516977de
...
@@ -1580,18 +1580,20 @@ proc main {server port} {
...
@@ -1580,18 +1580,20 @@ proc main {server port} {
set _ $err
set _ $err
}
{}
}
{}
test
{
HSET
return value. U
pdate
or
insert
?
}
{
test
{
HSET
in u
pdate
and
insert
mode
}
{
set rv
{}
set rv
{}
set k
[
lindex
[
array names smallhash *
]
0
]
set k
[
lindex
[
array names smallhash *
]
0
]
lappend rv
[
$r
hset smallhash $k newval
]
lappend rv
[
$r
hset smallhash $k newval1
]
lappend rv
[
$r
hget smallhash $k
]
lappend rv
[
$r
hset smallhash __foobar123__ newval
]
lappend rv
[
$r
hset smallhash __foobar123__ newval
]
set k
[
lindex
[
array names bighash *
]
0
]
set k
[
lindex
[
array names bighash *
]
0
]
lappend rv
[
$r
hset bighash $k newval
]
lappend rv
[
$r
hset bighash $k newval2
]
lappend rv
[
$r
hget bighash $k
]
lappend rv
[
$r
hset bighash __foobar123__ newval
]
lappend rv
[
$r
hset bighash __foobar123__ newval
]
lappend rv
[
$r
hdel smallhash __foobar123__
]
lappend rv
[
$r
hdel smallhash __foobar123__
]
lappend rv
[
$r
hdel bighash __foobar123__
]
lappend rv
[
$r
hdel bighash __foobar123__
]
set _ $rv
set _ $rv
}
{
0
1 0
1 1 1
}
}
{
0
newval1 1 0 newval2
1 1 1
}
test
{
HGET against non existing key
}
{
test
{
HGET against non existing key
}
{
set rv
{}
set rv
{}
...
...
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