From 7f3d3746e16fd12f7e87e5ebe7acc30fd692711b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 23 Aug 2022 02:06:06 +0200 Subject: [PATCH] [locale] Repair tests - Esperanto now doesn't quite self-match because it has no country - sr prefers RS as country over ME (cherry picked from commit 9a4d992778355d115a1d3cbd6b3ef7d61626e4b0) --- src/modules/locale/Tests.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/locale/Tests.cpp b/src/modules/locale/Tests.cpp index bdb0d5ebe..3b3c45881 100644 --- a/src/modules/locale/Tests.cpp +++ b/src/modules/locale/Tests.cpp @@ -374,7 +374,7 @@ LocaleTests::testLanguageDetectionValencia() { auto r = LocaleConfiguration::fromLanguageAndLocation( QStringLiteral( "sr" ), availableLocales, QStringLiteral( "NL" ) ); - QCOMPARE( r.language(), "sr_ME" ); // Because that one is first in the list + QCOMPARE( r.language(), "sr_RS" ); // Because that one is first in the list } { auto r = LocaleConfiguration::fromLanguageAndLocation( @@ -573,6 +573,10 @@ LocaleTests::testLanguageSimilarity() if ( self_similarity != 100 ) { cDebug() << "Locale" << l << "is unusual."; + if ( l == QStringLiteral( "eo" ) ) + { + QEXPECT_FAIL( "", "Esperanto has no country to match", Continue ); + } } QCOMPARE( self_similarity, 100 ); }