Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
212f1578
Commit
212f1578
authored
Jun 15, 2016
by
antirez
Browse files
Regression test for #3282.
parent
41d804d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/bitops.tcl
View file @
212f1578
...
@@ -43,6 +43,16 @@ start_server {tags {"bitops"}} {
...
@@ -43,6 +43,16 @@ start_server {tags {"bitops"}} {
r bitcount no-key
r bitcount no-key
}
0
}
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
}
catch
{
unset num
}
foreach vec
[
list
""
"
\xaa
"
"
\x00\x00\xff
"
"foobar"
"123"
]
{
foreach vec
[
list
""
"
\xaa
"
"
\x00\x00\xff
"
"foobar"
"123"
]
{
incr num
incr num
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment