From 5acf67a05778079b57586e13f5ffa3066742a46a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 17 Apr 2018 07:39:51 -0400 Subject: [PATCH] [locale] Fix tests with spaces in zone names - "North Dakota" -> "North_Dakota" following the change that fixes up dodgy names automatically. --- src/modules/locale/GeoIPTests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/locale/GeoIPTests.cpp b/src/modules/locale/GeoIPTests.cpp index 32faf7138..a98aa25ee 100644 --- a/src/modules/locale/GeoIPTests.cpp +++ b/src/modules/locale/GeoIPTests.cpp @@ -127,14 +127,14 @@ void GeoIPTests::testXML2() { static const char data[] = - "America/North Dakota/Beulah"; + "America/North Dakota/Beulah"; // With a space! #ifdef HAVE_XML GeoIPXML handler; auto tz = handler.processReply( data ); QCOMPARE( tz.first, QLatin1String( "America" ) ); - QCOMPARE( tz.second, QLatin1String( "North Dakota/Beulah" ) ); + QCOMPARE( tz.second, QLatin1String( "North_Dakota/Beulah" ) ); // Without space #endif } @@ -184,10 +184,10 @@ void GeoIPTests::testSplitTZ() tz = GeoIP::splitTZString( QLatin1String("America.NewYork") ); QCOMPARE( tz.first, QString() ); - // Check that three-level is split properly + // Check that three-level is split properly and space is replaced tz = GeoIP::splitTZString( QLatin1String("America/North Dakota/Beulah") ); QCOMPARE( tz.first, QLatin1String("America") ); - QCOMPARE( tz.second, QLatin1String("North Dakota/Beulah") ); + QCOMPARE( tz.second, QLatin1String("North_Dakota/Beulah") ); }