diff options
| author | oirfeodent <unknown> | 2016-09-07 13:49:08 +1000 |
|---|---|---|
| committer | oirfeodent <unknown> | 2016-09-07 13:49:08 +1000 |
| commit | 909fc02778bf5db5953a266a9aeff0291552b6cf (patch) | |
| tree | c2939b8dc43930d92ea73a2846f78f767dfba1ef /test | |
| parent | 821a5455ffc32cff47bde2946df43449c498e729 (diff) | |
| download | scintilla-mirror-909fc02778bf5db5953a266a9aeff0291552b6cf.tar.gz | |
Add InListAbridged to WordList.
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/testWordList.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/unit/testWordList.cxx b/test/unit/testWordList.cxx index a4ccf4d6a..e5874c01c 100644 --- a/test/unit/testWordList.cxx +++ b/test/unit/testWordList.cxx @@ -29,4 +29,26 @@ TEST_CASE("WordList") { REQUIRE(0 == strcmp(wl.WordAt(0), "else")); } + SECTION("InListAbridged") { + wl.Set("list w.~.active bo~k a~z ~_frozen"); + REQUIRE(wl.InListAbridged("list", '~')); + + REQUIRE(wl.InListAbridged("w.front.active", '~')); + REQUIRE(wl.InListAbridged("w.x.active", '~')); + REQUIRE(wl.InListAbridged("w..active", '~')); + REQUIRE(!wl.InListAbridged("w.active", '~')); + REQUIRE(!wl.InListAbridged("w.x.closed", '~')); + + REQUIRE(wl.InListAbridged("book", '~')); + REQUIRE(wl.InListAbridged("bok", '~')); + REQUIRE(!wl.InListAbridged("bk", '~')); + + REQUIRE(wl.InListAbridged("a_frozen", '~')); + REQUIRE(wl.InListAbridged("_frozen", '~')); + REQUIRE(!wl.InListAbridged("frozen", '~')); + + REQUIRE(wl.InListAbridged("abcz", '~')); + REQUIRE(wl.InListAbridged("abz", '~')); + REQUIRE(wl.InListAbridged("az", '~')); + } } |
