From 94e5c1d7e5928b53df545a62f91d033754408b43 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 18 Apr 2012 17:17:53 +0200 Subject: [PATCH] Test LINDEX out of range index. --- tests/unit/type/list.tcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl index 970e3ee7f..9a63d4513 100644 --- a/tests/unit/type/list.tcl +++ b/tests/unit/type/list.tcl @@ -26,6 +26,7 @@ start_server { assert_equal c [r lindex myziplist2 0] assert_equal b [r lindex myziplist2 1] assert_equal a [r lindex myziplist2 2] + assert_equal {} [r lindex myziplist2 3] assert_encoding ziplist myziplist2 } @@ -39,6 +40,7 @@ start_server { assert_equal $largevalue(linkedlist) [r lindex mylist1 0] assert_equal b [r lindex mylist1 1] assert_equal c [r lindex mylist1 2] + assert_equal {} [r lindex mylist1 3] # first rpush then lpush assert_equal 1 [r rpush mylist2 $largevalue(linkedlist)] @@ -49,6 +51,7 @@ start_server { assert_equal c [r lindex mylist2 0] assert_equal b [r lindex mylist2 1] assert_equal $largevalue(linkedlist) [r lindex mylist2 2] + assert_equal {} [r lindex mylist2 3] } test {Variadic RPUSH/LPUSH} {