diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-10-28 20:32:21 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2017-10-30 19:38:57 +0000 |
commit | 92c1659df289ab545a2a9a5180d5abce45e867e7 (patch) | |
tree | fcde459d6b7543fe183ac90bed218bdbfc5624f3 /tests/auto/utils | |
parent | 4c62cbd6dcc10a992e68e3bfa9988e23ba4970ee (diff) |
CamelHump: Prefer plain match over camel hump
For example:
Matching "lit" against "LiteralTable" should highlight "Lit" and not "Li"
and "T" from Table.
Change-Id: I8a0a9d0b0b90403745e85b1d3d20deaa551416eb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'tests/auto/utils')
-rw-r--r-- | tests/auto/utils/camelhumpmatcher/tst_camelhumpmatcher.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/utils/camelhumpmatcher/tst_camelhumpmatcher.cpp b/tests/auto/utils/camelhumpmatcher/tst_camelhumpmatcher.cpp index d9b5474341..b7a979e4c5 100644 --- a/tests/auto/utils/camelhumpmatcher/tst_camelhumpmatcher.cpp +++ b/tests/auto/utils/camelhumpmatcher/tst_camelhumpmatcher.cpp @@ -136,12 +136,14 @@ void tst_CamelHumpMatcher::highlighting_data() << MatchStart{13} << MatchLength{1}; QTest::newRow("humps-continued") << "LoCa" << "VeryLongCamelHump" << MatchStart{4, 8} << MatchLength{2, 2}; + QTest::newRow("duplicate-match") << "som" << "SomeMatch" + << MatchStart{0} << MatchLength{3}; QTest::newRow("numbers") << "4" << "TestJust4Fun" << MatchStart{8} << MatchLength{1}; QTest::newRow("wildcard-asterisk") << "Lo*Hu" << "VeryLongCamelHump" - << MatchStart{4, 13} << MatchLength{2, 2}; + << MatchStart{4} << MatchLength{11}; QTest::newRow("wildcard-question") << "Lo?g" << "VeryLongCamelHump" - << MatchStart{4, 7} << MatchLength{2, 1}; + << MatchStart{4} << MatchLength{4}; QTest::newRow("middle-no-hump") << "window" << "mainwindow.cpp" << MatchStart{4} << MatchLength{6}; } |