Full case/diacritics insensitivity in catalog filtering

Catalog filtering should now be case/diacritics insensitive for all
fields. However it is not validated for language, name and category
fields, and is validated for tags, creator & publisher only for text
supplied in the filter (but not for values read from the book).
This commit is contained in:
Veloman Yunkan
2021-04-13 23:23:40 +04:00
parent 87dc9d2723
commit f751aff2fb
2 changed files with 13 additions and 11 deletions

View File

@ -376,9 +376,11 @@ TEST_F(LibraryTest, filterByTags)
"Mythology & Folklore Stack Exchange"
);
// filtering by tags is case sensitive
EXPECT_FILTER_RESULTS(kiwix::Filter().acceptTags({"stackEXChange"}),
/* no results */
// filtering by tags is case and diacritics insensitive
EXPECT_FILTER_RESULTS(kiwix::Filter().acceptTags({"ståckEXÇhange"}),
"Islam Stack Exchange",
"Movies & TV Stack Exchange",
"Mythology & Folklore Stack Exchange"
);
// filtering by tags requires full match of the search term