# more information.
set tcl_precision 17
-source redis.tcl
+source tests/support/redis.tcl
set ::passed 0
set ::failed 0
}
proc datasetDigest r {
- set keys [lsort [$r keys *]]
- set digest {}
- foreach k $keys {
- set t [$r type $k]
- switch $t {
- {string} {
- set aux [::sha1::sha1 -hex [$r get $k]]
- } {list} {
- if {[$r llen $k] == 0} {
- set aux {}
- } else {
- set aux [::sha1::sha1 -hex [$r lrange $k 0 -1]]
- }
- } {set} {
- if {[$r scard $k] == 0} {
- set aux {}
- } else {
- set aux [::sha1::sha1 -hex [lsort [$r smembers $k]]]
- }
- } {zset} {
- if {[$r zcard $k] == 0} {
- set aux {}
- } 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"
- }
- }
- if {$aux eq {}} continue
- set digest [::sha1::sha1 -hex [join [list $aux $digest $k] "\n"]]
- }
- return $digest
+ $r debug digest
}
proc main {} {