From 01daeecee7a93b92e10347fc2613b8ee22de751e Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 24 Aug 2010 11:49:05 +0200 Subject: [PATCH] added tests for invalid bulk argument --- tests/unit/protocol.tcl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit/protocol.tcl b/tests/unit/protocol.tcl index 8717cd9f..9eebf77f 100644 --- a/tests/unit/protocol.tcl +++ b/tests/unit/protocol.tcl @@ -27,6 +27,13 @@ start_server {} { gets $fd } {*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} { set fd [r channel] puts -nonewline $fd "*1\r\nfoo\r\n"