diff options
author | antirez <antirez@gmail.com> | 2020-04-06 13:51:49 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-04-06 13:51:49 +0200 |
commit | af3c722feccb2d002e57f02ee5ef623f86e7ea2f (patch) | |
tree | e65a2218245ab80d7cda8cbc0cd9f6e8ec90bca6 | |
parent | ca8d6f1072e15fcb12827c1ca84b388c41e394b3 (diff) | |
download | redis-af3c722feccb2d002e57f02ee5ef623f86e7ea2f.tar.gz |
LCS: more tests.
-rw-r--r-- | tests/unit/type/string.tcl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/type/string.tcl b/tests/unit/type/string.tcl index 131a80ad0..b9ef9de7a 100644 --- a/tests/unit/type/string.tcl +++ b/tests/unit/type/string.tcl @@ -441,4 +441,12 @@ start_server {tags {"string"}} { test {LCS indexes} { dict get [r LCS IDX KEYS virus1 virus2] matches } {{{238 238} {239 239}} {{236 236} {238 238}} {{229 230} {236 237}} {{224 224} {235 235}} {{1 222} {13 234}}} + + test {LCS indexes with match len} { + dict get [r LCS IDX KEYS virus1 virus2 WITHMATCHLEN] matches + } {{{238 238} {239 239} 1} {{236 236} {238 238} 1} {{229 230} {236 237} 2} {{224 224} {235 235} 1} {{1 222} {13 234} 222}} + + test {LCS indexes with match len and minimum match len} { + dict get [r LCS IDX KEYS virus1 virus2 WITHMATCHLEN MINMATCHLEN 5] matches + } {{{1 222} {13 234} 222}} } |