提交 516977de 编写于 作者: A antirez

better HSET test

上级 2069d06a
......@@ -1580,18 +1580,20 @@ proc main {server port} {
set _ $err
} {}
test {HSET return value. Update or insert?} {
test {HSET in update and insert mode} {
set rv {}
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]
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 hdel smallhash __foobar123__]
lappend rv [$r hdel bighash __foobar123__]
set _ $rv
} {0 1 0 1 1 1}
} {0 newval1 1 0 newval2 1 1 1}
test {HGET against non existing key} {
set rv {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册