redict/tests/unit/type
Itamar Haber f44186e575
Adds count to L/RPOP (#8179)
Adds: `L/RPOP <key> [count]`

Implements no. 2 of the following strategies:

1. Loop on listTypePop - this would result in multiple calls for memory freeing and allocating (see 769167a079)
2. Iterate the range to build the reply, then call quickListDelRange - this requires two iterations and **is the current choice**
3. Refactor quicklist to have a pop variant of quickListDelRange - probably optimal but more complex

Also:
* There's a historical check for NULL after calling listTypePop that was converted to an assert.
* This refactors common logic shared between LRANGE and the new form of LPOP/RPOP into addListRangeReply (adds test for b/w compat)
* Consequently, it may have made sense to have `LRANGE l -1 -2` and `LRANGE l 9 0` be legit and return a reverse reply. Due to historical reasons that would be, however, a breaking change.
* Added minimal comments to existing commands to adhere to the style, make core dev life easier and get commit karma, naturally.
2020-12-25 21:49:24 +02:00
..
hash.tcl Sanitize dump payload: improve tests of ziplist and stream encodings 2020-12-06 14:54:34 +02:00
incr.tcl skip a test that uses +inf on valgrind (#7440) 2020-07-10 08:29:02 +03:00
list-2.tcl Minor improvements for list-2 test (#8156) 2020-12-08 16:26:38 +02:00
list-3.tcl Test: new randomized stress tester for #3343 alike bugs. 2016-06-28 09:42:20 +02:00
list-common.tcl list test split into smaller parts 2011-07-11 11:30:46 +02:00
list.tcl Adds count to L/RPOP (#8179) 2020-12-25 21:49:24 +02:00
set.tcl Implement SMISMEMBER key member [member ...] (#7615) 2020-08-11 11:55:06 +03:00
stream-cgroups.tcl Adds exclusive range query intervals to XPENDING (#8130) 2020-12-08 11:43:00 +02:00
stream.tcl Adds exclusive ranges to X[REV]RANGE (#8072) 2020-12-03 14:36:48 +02:00
string.tcl Getset fix (#8118) 2020-12-01 11:46:45 -08:00
zset.tcl ZREVRANGEBYSCORE Optimization for out of range offset (#5773) 2020-11-17 18:35:56 +02:00