提交 12f72a71 编写于 作者: A antirez

test-redis.tcl dataset digest function Hash support

上级 ad6de43c
......@@ -152,7 +152,6 @@ proc createComplexDataset {r ops} {
} {
$r zadd $k $d $v
} {
puts "hset $k $f $v"
$r hset $k $f $v
}
set t [$r type $k]
......@@ -179,7 +178,7 @@ proc createComplexDataset {r ops} {
}
{hash} {
randpath {$r hset $k $f $v} \
{puts "$r hdel $k $f"; $r hdel $k $f}
{$r hdel $k $f}
}
}
}
......@@ -211,6 +210,12 @@ proc datasetDigest r {
} else {
set aux [::sha1::sha1 -hex [$r zrange $k 0 -1]]
}
} {hash} {
if {[$r hlen $k] == 0} {
set aux {}
} else {
set aux [::sha1::sha1 -hex [lsort [$r hgetall $k]]]
}
} default {
error "Type not supported: $t"
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册