diff --git a/indexer/indexer_tests/search_string_utils_test.cpp b/indexer/indexer_tests/search_string_utils_test.cpp index 7a2a68b10c..8278d87ab8 100644 --- a/indexer/indexer_tests/search_string_utils_test.cpp +++ b/indexer/indexer_tests/search_string_utils_test.cpp @@ -10,12 +10,24 @@ UNIT_TEST(FeatureTypeToString) UNIT_TEST(NormalizeAndSimplifyStringWithOurTambourines) { + // This test is dependent from strings::NormalizeAndSimplifyString implementation. + // TODO: Fix it when logic with и-й will change. + + /* string const arr[] = {"ÜbërÅłłęšß", "uberallesss", // Basic test case. "Iiİı", "iiii", // Famous turkish "I" letter bug. "ЙЁйёШКИЙй", "йейешкийй", // Better handling of Russian й letter. "ØøÆ挜", "ooaeaeoeoe", "バス", "ハス" }; + */ + string const arr[] = {"ÜbërÅłłęšß", "uberallesss", // Basic test case. + "Iiİı", "iiii", // Famous turkish "I" letter bug. + "ЙЁйёШКИЙй", "иеиешкиии", // Better handling of Russian й letter. + "ØøÆ挜", "ooaeaeoeoe", + "バス", "ハス" + }; + for (size_t i = 0; i < ARRAY_SIZE(arr); i += 2) TEST_EQUAL(arr[i + 1], strings::ToUtf8(search::NormalizeAndSimplifyString(arr[i])), (i)); } diff --git a/indexer/search_string_utils.hpp b/indexer/search_string_utils.hpp index c6acea8e17..d27e43991a 100644 --- a/indexer/search_string_utils.hpp +++ b/indexer/search_string_utils.hpp @@ -44,6 +44,7 @@ inline strings::UniString NormalizeAndSimplifyString(string const & s) NormalizeInplace(uniString); return uniString; + /// @todo Restore this logic to distinguish и-й in future. /* // Just after lower casing is a correct place to avoid normalization for specific chars. static auto const isSpecificChar = [](UniChar c) -> bool