mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix(server): Fix Lua & Zset issue (#716)
* fix(server): Fix Lua & Zset issue Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
parent
bdfdc7d255
commit
7662e03d1f
4 changed files with 45 additions and 12 deletions
|
@ -86,6 +86,10 @@ TEST_F(ZSetFamilyTest, ZRangeRank) {
|
|||
ASSERT_THAT(resp, ArrLen(2));
|
||||
ASSERT_THAT(resp.GetVec(), ElementsAre("a", "1.1"));
|
||||
|
||||
resp = Run({"zrangebyscore", "x", "-inf", "+inf", "LIMIT", "0", "-1"});
|
||||
ASSERT_THAT(resp, ArrLen(2));
|
||||
ASSERT_THAT(resp.GetVec(), ElementsAre("a", "b"));
|
||||
|
||||
resp = Run({"zrevrangebyscore", "x", "+inf", "-inf", "limit", "0", "5"});
|
||||
ASSERT_THAT(resp, ArgType(RespExpr::ARRAY));
|
||||
ASSERT_THAT(resp.GetVec(), ElementsAre("b", "a"));
|
||||
|
@ -190,6 +194,10 @@ TEST_F(ZSetFamilyTest, ZRange) {
|
|||
resp = Run({"zrange", "key", "-", "d", "BYLEX", "BYSCORE"});
|
||||
EXPECT_THAT(resp, ErrArg("BYSCORE and BYLEX options are not compatible"));
|
||||
|
||||
resp = Run({"zrange", "key", "0", "-1", "LIMIT", "3", "-1"});
|
||||
ASSERT_THAT(resp, ArrLen(2));
|
||||
ASSERT_THAT(resp.GetVec(), ElementsAre("c", "e"));
|
||||
|
||||
Run({"zremrangebyscore", "key", "0", "4"});
|
||||
|
||||
Run({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue