Regression test for #3282.

This commit is contained in:
antirez 2016-06-15 11:49:49 +02:00
parent 41d804d9dc
commit 212f157855

View File

@ -43,6 +43,16 @@ start_server {tags {"bitops"}} {
r bitcount no-key
} 0
test {BITCOUNT returns 0 with out of range indexes} {
r set str "xxxx"
r bitcount str 4 10
} 0
test {BITCOUNT returns 0 with negative indexes where start > end} {
r set str "xxxx"
r bitcount str -6 -7
} 0
catch {unset num}
foreach vec [list "" "\xaa" "\x00\x00\xff" "foobar" "123"] {
incr num