[locale] Expand tests for matching-valencia locales
This commit is contained in:
parent
b8b7b10bfd
commit
40d8e1e0f6
@ -42,6 +42,7 @@ private Q_SLOTS:
|
|||||||
void testConfigInitialization();
|
void testConfigInitialization();
|
||||||
void testLanguageDetection_data();
|
void testLanguageDetection_data();
|
||||||
void testLanguageDetection();
|
void testLanguageDetection();
|
||||||
|
void testLanguageDetectionValencia();
|
||||||
};
|
};
|
||||||
|
|
||||||
QTEST_MAIN( LocaleTests )
|
QTEST_MAIN( LocaleTests )
|
||||||
@ -313,6 +314,26 @@ LocaleTests::testLanguageDetection()
|
|||||||
QCOMPARE( r.language(), expected + QStringLiteral( ".UTF-8" ) );
|
QCOMPARE( r.language(), expected + QStringLiteral( ".UTF-8" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LocaleTests::testLanguageDetectionValencia()
|
||||||
|
{
|
||||||
|
Logger::setupLogLevel( Logger::LOGDEBUG );
|
||||||
|
static const QStringList availableLocales { "nl_AW", "nl_BE.UTF-8", "nl_NL.UTF-8",
|
||||||
|
"en_AU.UTF-8", "en_US.UTF-8", "en_GB.UTF-8",
|
||||||
|
"ca_AD.UTF-8", "ca_ES.UTF-8", "ca_ES@valencia" };
|
||||||
|
|
||||||
|
{
|
||||||
|
auto r = LocaleConfiguration::fromLanguageAndLocation(
|
||||||
|
QStringLiteral( "nl" ), availableLocales, QStringLiteral( "NL" ) );
|
||||||
|
QCOMPARE( r.language(), "nl_NL.UTF-8" );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
auto r = LocaleConfiguration::fromLanguageAndLocation(
|
||||||
|
QStringLiteral( "ca@valencia" ), availableLocales, QStringLiteral( "NL" ) );
|
||||||
|
QCOMPARE( r.language(), "ca@valencia" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#include "utils/moc-warnings.h"
|
#include "utils/moc-warnings.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user