Merging upstream version 1.12.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
d6445459ac
commit
7865f9a813
20 changed files with 536 additions and 80 deletions
|
@ -54,3 +54,27 @@ def test_command_with_key_in_quotes(judge_command):
|
|||
judge_command(
|
||||
'cluster keyslot "mykey "', {"command": "cluster keyslot", "key": '"mykey "'}
|
||||
)
|
||||
|
||||
|
||||
def test_timeout(token_should_match, token_should_not_match):
|
||||
from iredis.redis_grammar import TIMEOUT
|
||||
|
||||
token_should_match(TIMEOUT, "1.1")
|
||||
token_should_match(TIMEOUT, "1.0")
|
||||
token_should_match(TIMEOUT, ".1")
|
||||
token_should_match(TIMEOUT, "123123.1123")
|
||||
token_should_not_match(TIMEOUT, "1.")
|
||||
token_should_not_match(TIMEOUT, ".")
|
||||
token_should_not_match(TIMEOUT, ".a")
|
||||
|
||||
|
||||
def test_lr_const(token_should_match, token_should_not_match):
|
||||
from iredis.redis_grammar import LR_CONST
|
||||
|
||||
token_should_match(LR_CONST, "left")
|
||||
token_should_match(LR_CONST, "right")
|
||||
token_should_match(LR_CONST, "LEFT")
|
||||
token_should_match(LR_CONST, "RIGHT")
|
||||
token_should_not_match(LR_CONST, "righ")
|
||||
token_should_not_match(LR_CONST, "ab")
|
||||
token_should_not_match(LR_CONST, "123")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue