redict/tests
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
..
assets Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
cluster Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
helpers revert an accidental test code change done as part of the tls project 2019-12-01 16:10:09 +02:00
integration Sanitize dump payload: excessive free on dup zset fields (#8189) 2020-12-14 17:10:31 +02:00
modules Remove read-only flag from non-keyspace cmds, different approach for EXEC to propagate MULTI (#8216) 2020-12-22 12:03:49 +02:00
sentinel Recalculate hardcoded variables from $::instances_count in sentinel tests (#7561) 2020-09-13 18:39:59 +03:00
support Tests: fix the problem that Darwin memory leak detection may fail (#8213) 2020-12-23 16:28:17 +02:00
tmp minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00
unit Adds count to L/RPOP (#8179) 2020-12-25 21:49:24 +02:00
instances.tcl TLS: Add different client cert support. (#8076) 2020-12-11 18:31:40 +02:00
test_helper.tcl TLS: Add different client cert support. (#8076) 2020-12-11 18:31:40 +02:00