redict/tests/unit
antirez 6dd1693c0e Scripting: redis.NIL to return nil bulk replies.
Lua arrays can't contain nil elements (see
http://www.lua.org/pil/19.1.html for more information), so Lua scripts
were not able to return a multi-bulk reply containing nil bulk
elements inside.

This commit introduces a special conversion: a table with just
a "nilbulk" field set to a boolean value is converted by Redis as a nil
bulk reply, but at the same time for Lua this type is not a "nil" so can
be used inside Lua arrays.

This type is also assigned to redis.NIL, so the following two forms
are equivalent and will be able to return a nil bulk reply as second
element of a three elements array:

    EVAL "return {1,redis.NIL,3}" 0
    EVAL "return {1,{nilbulk=true},3}" 0

The result in redis-cli will be:

    1) (integer) 1
    2) (nil)
    3) (integer) 3
2012-09-28 14:26:20 +02:00
..
type Test for SRANDMEMBER with <count>. 2012-09-21 11:55:36 +02:00
aofrw.tcl Tests modified to account for INFO fields renaming. 2012-05-25 15:20:59 +02:00
auth.tcl Fix for issue #132. Now AUTH raises an error if no server password is configured. 2011-10-10 22:21:17 +02:00
basic.tcl more valgrind (and other archs) friendly testing of floating number related features. 2011-11-16 14:40:50 +01:00
bitops.tcl BITCOUNT regression test for #582 fixed for 32 bit target. 2012-09-05 17:50:10 +02:00
cas.tcl SORT with STORE removes key if result is empty. This fixes issue #227. 2012-01-30 07:36:49 +01:00
dump.tcl Fixed RESTORE hash failure (Issue #532) 2012-06-02 10:24:27 +02:00
expire.tcl Show problem with 'keys' command with specific command sequence. 2012-05-01 10:51:59 +02:00
introspection.tcl Tests for MONITOR. 2012-04-07 11:26:24 +02:00
limits.tcl More robust maxclients test. 2012-04-18 11:34:18 +02:00
maxmemory.tcl Maxmemory test 2011-07-28 12:32:52 +02:00
obuf-limits.tcl even less false positive on obuf-limits test. 2012-02-22 11:25:30 +01:00
other.tcl false positive in expire tests mitigated with a sleep, but other solutions exist if needed later. 2012-01-26 16:45:08 +01:00
printver.tcl Print version info before running the test 2011-05-20 11:44:54 +02:00
protocol.tcl New time limit for protocol desync test set to 30 seconds to reduce false positives. 2012-04-23 10:57:43 +02:00
pubsub.tcl more pub/sub tests 2010-06-16 11:03:23 +02:00
quit.tcl Add tests for OK on QUIT 2010-10-15 12:54:53 +02:00
scripting.tcl Scripting: redis.NIL to return nil bulk replies. 2012-09-28 14:26:20 +02:00
slowlog.tcl Limit memory used by big SLOWLOG entries. 2012-04-21 20:34:45 +02:00
sort.tcl Added test for SORT corner case: pattern ending with just "->". 2012-04-17 16:28:59 +02:00