Skip to content
Snippets Groups Projects
Commit 7f3d3746 authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

[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 9a4d9927)
parent 55bea246
No related branches found
No related tags found
No related merge requests found
...@@ -374,7 +374,7 @@ LocaleTests::testLanguageDetectionValencia() ...@@ -374,7 +374,7 @@ LocaleTests::testLanguageDetectionValencia()
{ {
auto r = LocaleConfiguration::fromLanguageAndLocation( auto r = LocaleConfiguration::fromLanguageAndLocation(
QStringLiteral( "sr" ), availableLocales, QStringLiteral( "NL" ) ); 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( auto r = LocaleConfiguration::fromLanguageAndLocation(
...@@ -573,6 +573,10 @@ LocaleTests::testLanguageSimilarity() ...@@ -573,6 +573,10 @@ LocaleTests::testLanguageSimilarity()
if ( self_similarity != 100 ) if ( self_similarity != 100 )
{ {
cDebug() << "Locale" << l << "is unusual."; cDebug() << "Locale" << l << "is unusual.";
if ( l == QStringLiteral( "eo" ) )
{
QEXPECT_FAIL( "", "Esperanto has no country to match", Continue );
}
} }
QCOMPARE( self_similarity, 100 ); QCOMPARE( self_similarity, 100 );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment