]> git.saurik.com Git - redis.git/blobdiff - tests/unit/protocol.tcl
INCRBYFLOAT tests
[redis.git] / tests / unit / protocol.tcl
index d1fadffbc7265ed6609dd8622dfceaa8b9152c99..516a834a858c14138503d6c447139ce0e0cd89d6 100644 (file)
@@ -13,6 +13,13 @@ start_server {tags {"protocol"}} {
         assert_equal PONG [r ping]
     }
 
+    test "Out of range multibulk length" {
+        reconnect
+        r write "*20000000\r\n"
+        r flush
+        assert_error "*invalid multibulk length*" {r read}
+    }
+
     test "Wrong multibulk payload header" {
         reconnect
         r write "*3\r\n\$3\r\nSET\r\n\$1\r\nx\r\nfooz\r\n"
@@ -53,3 +60,19 @@ start_server {tags {"protocol"}} {
         assert_error "*wrong*arguments*ping*" {r ping x y z}
     }
 }
+
+start_server {tags {"regression"}} {
+    test "Regression for a crash with blocking ops and pipelining" {
+        set rd [redis_deferring_client]
+        set fd [r channel]
+        set proto "*3\r\n\$5\r\nBLPOP\r\n\$6\r\nnolist\r\n\$1\r\n0\r\n"
+        puts -nonewline $fd $proto$proto
+        flush $fd
+        set res {}
+
+        $rd rpush nolist a
+        $rd read
+        $rd rpush nolist a
+        $rd read
+    }
+}