Review Request 130013: Make PlainTextExtractor match "text/plain" mimetype
Matthieu Gallien
matthieu_gallien at yahoo.fr
Fri Mar 17 07:20:55 UTC 2017
> On mars 15, 2017, 9:55 matin, Matthieu Gallien wrote:
> > Ship It!
>
> Matthieu Gallien wrote:
> KFileMetaData being in use by itself, IMHO Baloo problematics should not block this correction.
>
> Matthieu Gallien wrote:
> I almost forgot to ask an automatic test for your fix. Please do not ship without it.
>
> Matthieu Gallien wrote:
> You can see that current tests do not cover the line you are modifying: https://build.kde.org/view/Frameworks%20kf5-qt5/job/kfilemetadata%20master%20kf5-qt5/PLATFORM=Linux,compiler=gcc/lastCompletedBuild/cobertura/src_extractors/plaintextextractor_cpp/ .
>
> Igor Poboiko wrote:
> Unfortunately, I've got not that much experience in writing autotests...
>
> I think the proper test that would have revealed that problem would be actually a test for ExtractorCollection::fetchExtractors (just check some more or less obvious mimetypes and see that correct plugins are returned).
> If you think this is fine, I can see how other tests are done and then add one.
>
> Matthieu Gallien wrote:
> Thanks for taking care of that bug.
>
> Do not feel scared, there are already tests that may get you started. I am also very happy to help if I can.
> In the current automatic tests, you will see that there are example files in the samplefiles directory. There is even one called plain_text_file.txt.
> You can have a look at any of the tests called <something>extractortest.{h|cpp}. They may provide you inspiration.
>
> Let me know if I can help you.
Thanks for having taken care of automatic test.
I had a more general look at the exitsing tests with plain_text_file.txt. They are completely like the other automatic tests like taglib, the extractor is hardcoded. No way they would detect the bug you are fixing.
If nobody beats me to it, I will try to fix that problem soon.
As far as I am concerned, please push your fix.
- Matthieu
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130013/#review102851
-----------------------------------------------------------
On mars 16, 2017, 9:33 après-midi, Igor Poboiko wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130013/
> -----------------------------------------------------------
>
> (Updated mars 16, 2017, 9:33 après-midi)
>
>
> Review request for KDE Frameworks and Anthony Fieroni.
>
>
> Repository: kfilemetadata
>
>
> Description
> -------
>
> After commit 7c7e985a4678fef5f5d0dd8faa9b9cb42e3844b4 (see https://git.reviewboard.kde.org/r/129720/), PlainTextExtractor no longer matches ANY of the text/ mimetypes.
> This broke completely Baloo indexing e.g. simple plain text files.
> Introduced check however allows to provide "text/plain" as supported mimetype for the extractor and hope that everything containing plain text will be inherited from it.
>
>
> Diffs
> -----
>
> autotests/CMakeLists.txt 5ab742b
> autotests/extractorcollectiontest.cpp PRE-CREATION
> src/externalextractor.cpp 05f0645
> src/extractors/plaintextextractor.cpp 26e1247
>
> Diff: https://git.reviewboard.kde.org/r/130013/diff/
>
>
> Testing
> -------
>
> KFileMetaData compiles.
> Baloo indexes plain text files.
> Everybody is happy.
>
>
> Thanks,
>
> Igor Poboiko
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170317/0798b79c/attachment.html>
More information about the Kde-frameworks-devel
mailing list