added tests for invalid bulk argument

This commit is contained in:
antirez 2010-08-24 11:49:05 +02:00
parent a679185aa5
commit 01daeecee7

View File

@ -27,6 +27,13 @@ start_server {} {
gets $fd gets $fd
} {*invalid bulk*count*} } {*invalid bulk*count*}
test {bulk payload is not a number} {
set fd [r channel]
puts -nonewline $fd "SET x blabla\r\n"
flush $fd
gets $fd
} {*invalid bulk*count*}
test {Multi bulk request not followed by bulk args} { test {Multi bulk request not followed by bulk args} {
set fd [r channel] set fd [r channel]
puts -nonewline $fd "*1\r\nfoo\r\n" puts -nonewline $fd "*1\r\nfoo\r\n"