lsort [$r smembers setres]
} [lsort -uniq "[$r smembers set1] [$r smembers set2]"]
- test {SUNIONSTORE with same src and dest} {
- $r sunionstore set1 set1 set1
- $r scard set1
- } {1000}
-
test {SINTER against three sets} {
$r sadd set3 999
$r sadd set3 995
lsort [$r smembers setres]
} {995 999}
- test {SINTERSTORE with same src and dest} {
- $r sinterstore set1 set1 set1
- $r scard set1
- } {1000}
-
test {SUNION with non existing keys} {
lsort [$r sunion nokey1 set1 set2 nokey2]
} [lsort -uniq "[$r smembers set1] [$r smembers set2]"]