diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-09-23 21:16:57 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-09-23 21:17:16 +0200 |
| commit | bab10f5b93abaf9f75a538f291576d4789c30926 (patch) | |
| tree | 25ec817a5c0e41539a70297826ea50cca30fc254 /src/unit_tests.cc | |
| parent | 5ae43acf945c6574cebccb6c5d1b3b5427deed70 (diff) | |
add subsequence_match(str, subseq) utility function
Diffstat (limited to 'src/unit_tests.cc')
| -rw-r--r-- | src/unit_tests.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/unit_tests.cc b/src/unit_tests.cc index 589a83fe..e49f7b3a 100644 --- a/src/unit_tests.cc +++ b/src/unit_tests.cc @@ -141,6 +141,11 @@ void test_string() kak_assert(prefix_match("tchou kanaky", "tchou kanaky")); kak_assert(prefix_match("tchou kanaky", "t")); kak_assert(not prefix_match("tchou kanaky", "c")); + + kak_assert(subsequence_match("tchou kanaky", "tknky")); + kak_assert(subsequence_match("tchou kanaky", "knk")); + kak_assert(subsequence_match("tchou kanaky", "tchou kanaky")); + kak_assert(not subsequence_match("tchou kanaky", "tchou kanaky")); } void test_keys() |
