Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ddcbb628
Unverified
Commit
ddcbb628
authored
Aug 12, 2020
by
Mota
Committed by
GitHub
Aug 12, 2020
Browse files
Test:Fix invalid cases in hash.tcl and dump.tcl (#4611)
parent
fbed632f
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/unit/dump.tcl
View file @
ddcbb628
...
@@ -170,7 +170,7 @@ start_server {tags {"dump"}} {
...
@@ -170,7 +170,7 @@ start_server {tags {"dump"}} {
$second set list somevalue
$second set list somevalue
catch
{
r -1 migrate $second_host $second_port list 9 5000 copy
}
e
catch
{
r -1 migrate $second_host $second_port list 9 5000 copy
}
e
assert_match
{
ERR*
}
$e
assert_match
{
ERR*
}
$e
set re
s
[
r -1 migrate $second_host $second_port list 9 5000 copy replace
]
set re
t
[
r -1 migrate $second_host $second_port list 9 5000 copy replace
]
assert
{
$ret
eq
{
OK
}}
assert
{
$ret
eq
{
OK
}}
assert
{[
$first
exists list
]
== 1
}
assert
{[
$first
exists list
]
== 1
}
assert
{[
$second
exists list
]
== 1
}
assert
{[
$second
exists list
]
== 1
}
...
...
tests/unit/type/hash.tcl
View file @
ddcbb628
...
@@ -302,7 +302,7 @@ start_server {tags {"hash"}} {
...
@@ -302,7 +302,7 @@ start_server {tags {"hash"}} {
r hset smallhash str
" 11"
r hset smallhash str
" 11"
r hset bighash str
" 11"
r hset bighash str
" 11"
catch
{
r hincrby smallhash str 1
}
smallerr
catch
{
r hincrby smallhash str 1
}
smallerr
catch
{
r hincrby
small
hash str 1
}
bigerr
catch
{
r hincrby
big
hash str 1
}
bigerr
set rv
{}
set rv
{}
lappend rv
[
string match
"ERR*not an integer*"
$smallerr
]
lappend rv
[
string match
"ERR*not an integer*"
$smallerr
]
lappend rv
[
string match
"ERR*not an integer*"
$bigerr
]
lappend rv
[
string match
"ERR*not an integer*"
$bigerr
]
...
@@ -312,7 +312,7 @@ start_server {tags {"hash"}} {
...
@@ -312,7 +312,7 @@ start_server {tags {"hash"}} {
r hset smallhash str
"11 "
r hset smallhash str
"11 "
r hset bighash str
"11 "
r hset bighash str
"11 "
catch
{
r hincrby smallhash str 1
}
smallerr
catch
{
r hincrby smallhash str 1
}
smallerr
catch
{
r hincrby
small
hash str 1
}
bigerr
catch
{
r hincrby
big
hash str 1
}
bigerr
set rv
{}
set rv
{}
lappend rv
[
string match
"ERR*not an integer*"
$smallerr
]
lappend rv
[
string match
"ERR*not an integer*"
$smallerr
]
lappend rv
[
string match
"ERR*not an integer*"
$bigerr
]
lappend rv
[
string match
"ERR*not an integer*"
$bigerr
]
...
@@ -374,7 +374,7 @@ start_server {tags {"hash"}} {
...
@@ -374,7 +374,7 @@ start_server {tags {"hash"}} {
r hset smallhash str
" 11"
r hset smallhash str
" 11"
r hset bighash str
" 11"
r hset bighash str
" 11"
catch
{
r hincrbyfloat smallhash str 1
}
smallerr
catch
{
r hincrbyfloat smallhash str 1
}
smallerr
catch
{
r hincrbyfloat
small
hash str 1
}
bigerr
catch
{
r hincrbyfloat
big
hash str 1
}
bigerr
set rv
{}
set rv
{}
lappend rv
[
string match
"ERR*not*float*"
$smallerr
]
lappend rv
[
string match
"ERR*not*float*"
$smallerr
]
lappend rv
[
string match
"ERR*not*float*"
$bigerr
]
lappend rv
[
string match
"ERR*not*float*"
$bigerr
]
...
@@ -384,7 +384,7 @@ start_server {tags {"hash"}} {
...
@@ -384,7 +384,7 @@ start_server {tags {"hash"}} {
r hset smallhash str
"11 "
r hset smallhash str
"11 "
r hset bighash str
"11 "
r hset bighash str
"11 "
catch
{
r hincrbyfloat smallhash str 1
}
smallerr
catch
{
r hincrbyfloat smallhash str 1
}
smallerr
catch
{
r hincrbyfloat
small
hash str 1
}
bigerr
catch
{
r hincrbyfloat
big
hash str 1
}
bigerr
set rv
{}
set rv
{}
lappend rv
[
string match
"ERR*not*float*"
$smallerr
]
lappend rv
[
string match
"ERR*not*float*"
$smallerr
]
lappend rv
[
string match
"ERR*not*float*"
$bigerr
]
lappend rv
[
string match
"ERR*not*float*"
$bigerr
]
...
...
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