From 24efce0c1d5601a77ad2b919cf0cf387231add76 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 17 Aug 2020 15:09:20 +0200 Subject: [PATCH] [locale] Make sanity checks in tests more explicit SEE #1490 --- src/modules/locale/Tests.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/modules/locale/Tests.cpp b/src/modules/locale/Tests.cpp index 52d4882a2..021140b60 100644 --- a/src/modules/locale/Tests.cpp +++ b/src/modules/locale/Tests.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * - * Copyright 2019-2020, Adriaan de Groot + * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,6 +43,7 @@ private Q_SLOTS: void testSplitLocaleConfiguration(); // Check the TZ images for consistency + void testTZSanity(); void testTZImages(); // No overlaps in images void testTZLocations(); // No overlaps in locations void testSpecificLocations(); @@ -106,6 +108,18 @@ LocaleTests::testSplitLocaleConfiguration() QCOMPARE( lc3.lc_numeric, QStringLiteral( "de_DE.UTF-8" ) ); } +void +LocaleTests::testTZSanity() +{ + // Data source for all TZ info + QVERIFY( QFile( "/usr/share/zoneinfo/zone.tab" ).exists() ); + + // Contains a sensible number of total zones + const CalamaresUtils::Locale::ZonesModel zones; + QVERIFY( zones.rowCount( QModelIndex() ) > 100 ); +} + + void LocaleTests::testTZImages() {