summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qlocale
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-05-09 11:57:12 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2023-05-15 14:02:47 +0200
commit4768fcf836f1eb0f59ab62a29eb821b433a239c1 (patch)
tree6732b7b9568fc9237f063e1fbaf8763016d2e222 /tests/auto/corelib/text/qlocale
parent637e1542cfd75969edabba547af693f29411e6aa (diff)
Fix case-sensitivity of exponent separator check in Cyrillic fall-back
When matching the locale's correct exponent separator, QLocale was doing a case-insensitive match; but the Cyrillic fall-back was matching case-sensitively, so failed to catch the case of lower-case e and its Cyrillic equivalent, when used in a Cyrillic font in place of the upper-case form of the other, where that's the locale's official separator. So make this comparison case-insensitive. Added some test-cases for the lower-case exponential separator. Pick-to: 6.5 Fixes: QTBUG-113443 Change-Id: I18e22d7b3451fbb61e87d5b93661eadff3c7356e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Diffstat (limited to 'tests/auto/corelib/text/qlocale')
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 579a2fd8f7..959327551b 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -916,8 +916,12 @@ void tst_QLocale::toReal_data()
// may be some cross-over between these.
QTest::newRow("uk_UA Cyrillic E") << u"uk_UA"_s << u"4\u0415-3"_s << true << 4e-3; // Official
QTest::newRow("uk_UA Latin E") << u"uk_UA"_s << u"4E-3"_s << true << 4e-3;
+ QTest::newRow("uk_UA Cyrilic e") << u"uk_UA"_s << u"4\u0435-3"_s << true << 4e-3;
+ QTest::newRow("uk_UA Latin e") << u"uk_UA"_s << u"4e-3"_s << true << 4e-3;
QTest::newRow("ru_RU Latin E") << u"ru_RU"_s << u"4E-3"_s << true << 4e-3; // Official
QTest::newRow("ru_RU Cyrillic E") << u"ru_RU"_s << u"4\u0415-3"_s << true << 4e-3;
+ QTest::newRow("ru_RU Latin e") << u"ru_RU"_s << u"4e-3"_s << true << 4e-3;
+ QTest::newRow("ru_RU Cyrilic e") << u"ru_RU"_s << u"4\u0435-3"_s << true << 4e-3;
}
void tst_QLocale::stringToDouble_data()