[locale] Fix test -- needs translation languages, old style
This commit is contained in:
parent
1e42e1562e
commit
4b541b5b29
@ -11,6 +11,7 @@
|
||||
#include "LocaleConfiguration.h"
|
||||
#include "timezonewidget/TimeZoneImage.h"
|
||||
|
||||
#include "CalamaresVersion.h"
|
||||
#include "Settings.h"
|
||||
#include "locale/TimeZone.h"
|
||||
#include "locale/TranslationsModel.h"
|
||||
@ -59,6 +60,7 @@ private Q_SLOTS:
|
||||
private:
|
||||
QStringList m_KDEneonLocales;
|
||||
QStringList m_FreeBSDLocales;
|
||||
QStringList m_availableLanguages;
|
||||
};
|
||||
|
||||
QTEST_MAIN( LocaleTests )
|
||||
@ -77,6 +79,7 @@ LocaleTests::initTestCase()
|
||||
{
|
||||
(void)new Calamares::Settings( true );
|
||||
}
|
||||
m_availableLanguages = QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';' );
|
||||
}
|
||||
|
||||
void
|
||||
@ -461,7 +464,7 @@ LocaleTests::testLanguageMappingNeon()
|
||||
QFETCH( QString, KDEneonLanguage );
|
||||
QFETCH( QString, FreeBSDLanguage );
|
||||
|
||||
QVERIFY( Calamares::Locale::availableLanguages().contains( selectedLanguage ) );
|
||||
QVERIFY( m_availableLanguages.contains( selectedLanguage ) );
|
||||
|
||||
const auto neon = LocaleConfiguration::fromLanguageAndLocation(
|
||||
( selectedLanguage ), m_KDEneonLocales, QStringLiteral( "NL" ) );
|
||||
@ -477,7 +480,7 @@ LocaleTests::testLanguageMappingFreeBSD()
|
||||
QFETCH( QString, KDEneonLanguage );
|
||||
QFETCH( QString, FreeBSDLanguage );
|
||||
|
||||
QVERIFY( Calamares::Locale::availableLanguages().contains( selectedLanguage ) );
|
||||
QVERIFY( m_availableLanguages.contains( selectedLanguage ) );
|
||||
|
||||
const auto bsd = LocaleConfiguration::fromLanguageAndLocation(
|
||||
( selectedLanguage ), m_FreeBSDLocales, QStringLiteral( "NL" ) );
|
||||
|
Loading…
Reference in New Issue
Block a user