D25258: test(search): Add test case for baloo parsing model

Stefan BrĂ¼ns noreply at phabricator.kde.org
Mon Nov 11 22:15:24 GMT 2019


bruns requested changes to this revision.
bruns added a comment.


  Please move everything added to a new file, this is independent from the searchbox itself.

INLINE COMMENTS

> dolphinsearchboxtest.cpp:90
> +{
> +    const Baloo::IndexerConfig searchInfo;
> +    if (!searchInfo.fileIndexingEnabled()) {

The parsing is independent from the config.

> dolphinsearchboxtest.cpp:170
> +    // FIXME: Current parsing bugs
> +    QEXPECT_FAIL("content/singleQuote", "Quotes around text are shown", Continue);
> +    QEXPECT_FAIL("content/doubleQuote", "Quotes around text are shown", Continue);

Just add a column "failureReason" to the data, and do

  if (!failureReason.empty()) {
      QEXPECT_FAIL("", qPrintable(failureReason), Continue);
  }

Keeps test and result together.

> dolphinsearchboxtest.cpp:193
> +    for (int i=0; i < expectedTerms.count(); i++) {
> +        QCOMPARE(searchTerms.at(i).trimmed(), expectedTerms.at(i).trimmed());
> +    }

the second   `.trimmed()` should better be not necessary.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D25258

To: iasensio, elvisangelaccio, bruns, #dolphin
Cc: kfm-devel, pberestov, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191111/ad0b65e3/attachment.htm>


More information about the kfm-devel mailing list