diff options
| author | Ismael Asensio <[email protected]> | 2020-06-14 13:41:29 +0200 |
|---|---|---|
| committer | Ismael Asensio <[email protected]> | 2020-07-11 18:33:58 +0000 |
| commit | 2fc117703f304ba053e2b58b692609f9632535d7 (patch) | |
| tree | e5434bfb4f2776b43266c771cbca346136f18524 /src/tests | |
| parent | 2463a35f3e4fd32cedd630b435618714728353ee (diff) | |
Add support to tags: scheme in DolphinQuery
It allows to start a search from a `tags:/mytag/` view.
The use case is to refine a search on additional terms (another tags,
ratings, etc)
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/dolphinquerytest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/dolphinquerytest.cpp b/src/tests/dolphinquerytest.cpp index 25bd26b81..9e1c76737 100644 --- a/src/tests/dolphinquerytest.cpp +++ b/src/tests/dolphinquerytest.cpp @@ -150,6 +150,15 @@ void DolphinSearchBoxTest::testBalooSearchParsing_data() QTest::newRow("allTerms/space") << balooQueryUrl(textS + " " + filenameS + " " + rating + " AND " + modified + " AND " + tagS) << textS + " " + filenameS << QStringList({modified, rating, tagR}) << true << true; + + // Test tags:/ URL scheme + const auto tagUrl = [](const QString &tag) { return QUrl(QStringLiteral("tags:/%1/").arg(tag)); }; + const auto tagTerms = [](const QString &tag) { return QStringList{QStringLiteral("tag:%1").arg(tag)}; }; + + QTest::newRow("tagsUrl") << tagUrl("tagA") << "" << tagTerms("tagA") << false << false; + QTest::newRow("tagsUrl/space") << tagUrl("tagB with spaces") << "" << tagTerms("tagB with spaces") << false << false; + QTest::newRow("tagsUrl/hash") << tagUrl("tagC#hash") << "" << tagTerms("tagC#hash") << false << false; + QTest::newRow("tagsUrl/slash") << tagUrl("tagD/with/slash") << "" << tagTerms("tagD/with/slash") << false << false; } /** |
