32 Commits

Author SHA1 Message Date
Jan-Erik Rediger
ea8b1d383f Handle large getrange requests
Previously the end was casted to a smaller type
which resulted in a wrong check and failed
with values larger than handled by unsigned.

Closes #1847, #1844
2014-08-07 12:40:44 +02:00
antirez
45c507b0bd Test: use higher level redis.tcl proc to read replies. 2014-06-18 16:25:53 +02:00
Matt Stancliff
daba106237 Add test for deleting an expired key
Verify proper expire-before-delete behavior.

This test passes with the expire-before-delete commit and fails
without it.
2014-04-10 18:32:19 -04:00
antirez
d1bdb17b42 SCAN: tests moved to unit/scan.tcl. 2013-10-30 11:34:01 +01:00
antirez
b18ac5f574 SCAN: Fix test after option renamed from PATTERN to MATCH. 2013-10-25 11:55:28 +02:00
Pieter Noordhuis
956c0ed927 Add SCAN command 2013-10-25 10:49:48 +02:00
antirez
995cb581a9 Test: regression test for issue #1208. 2013-07-22 23:40:48 +02:00
antirez
bd771b6c45 Test: Extended SET tests. 2013-03-28 16:25:24 +01:00
antirez
a037c6abf5 Type mismatch errors are now prefixed with WRONGTYPE.
So instead to reply with a generic error like:

-ERR ... wrong kind of value ...

now it replies with:

-WRONGTYPE ... wrong kind of value ...

This makes this particular error easy to check without resorting to
(fragile) pattern matching of the error string (however the error string
used to be consistent already).

Client libraries should return a specific exeption type for this error.

Most of the commit is about fixing unit tests.
2012-11-06 20:25:34 +01:00
antirez
26d2ed1ce4 more valgrind (and other archs) friendly testing of floating number related features. 2011-11-16 14:40:50 +01:00
antirez
85056993ed valgrind handles floating point numbers differently for some reason, so using "simpler" numbers to make tests happy. 2011-11-16 13:35:22 +01:00
antirez
3d4825324c test for the new more strict behavior about number parsing 2011-11-14 15:39:55 +01:00
antirez
3752894b44 INCRBYFLOAT tests 2011-11-14 15:37:13 +01:00
antirez
c2e00623f5 Added two new tests for RENAME, currently both will fail because of bug #128. 2011-10-10 12:01:13 +02:00
Pieter Noordhuis
f8dc0b8195 SETNX regression tests. 2011-06-20 16:42:29 +02:00
Pieter Noordhuis
305ce236b0 Update tests for STRLEN 2010-12-15 11:49:39 +01:00
Pieter Noordhuis
4b232afcf3 Disable negative offsets for SETRANGE 2010-12-15 11:30:50 +01:00
Pieter Noordhuis
46271240b3 Add fuzzy test for SETBIT 2010-12-15 11:20:54 +01:00
Pieter Noordhuis
77f5cf47e0 Make SETBIT return original bit value 2010-12-15 00:42:32 +01:00
Pieter Noordhuis
2bc467ba66 Add test cases for GETRANGE against integer-encoded strings 2010-12-14 15:35:35 +01:00
Pieter Noordhuis
c247d94dff Refactor and rename SUBSTR to GETRANGE
SUBSTR is renamed to GETRANGE to have better consistency between command
names (with SETRANGE as its dual). GETRANGE is still aliased as SUBSTR.
2010-12-14 15:16:29 +01:00
Pieter Noordhuis
641289670c Add SETRANGE command implementation and tests 2010-12-14 14:20:51 +01:00
Pieter Noordhuis
09586f8b7a Add generic function to grow an sds value
Move logic concerned with setting a bit in an sds to the SETBIT command
instead of keeping it in sds.c. The function to grow an sds can and will
be reused for a command to set a range within a string value.
2010-12-10 11:58:21 +01:00
Pieter Noordhuis
73dbf7c942 Enforce maximum string value length of 512MB 2010-12-09 17:16:10 +01:00
Pieter Noordhuis
c139b6812d Add commands SETBIT/GETBIT 2010-12-09 16:39:33 +01:00
Pieter Noordhuis
9ddc6fded8 Change tests to use either the inline or the multibulk protocol 2010-10-15 17:25:20 +02:00
antirez
2c572622fb no longer passing tests due to the new write-on-volatile semantics modified/removed 2010-08-03 13:08:32 +02:00
antirez
80091bbaac STRLEN command implemented 2010-07-27 10:09:26 +02:00
Pieter Noordhuis
7f7499eeac tags for existing tests 2010-06-02 23:22:25 +02:00
Pieter Noordhuis
6e0e5bedd9 basic support to tag tests 2010-06-02 22:53:22 +02:00
Pieter Noordhuis
9e5d2e8bd6 changed how server.tcl accepts options to support more directives without requiring more arguments to the proc 2010-06-02 22:23:52 +02:00
antirez
ab72b4833d minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00