[locale] Fix tests with spaces in zone names
- "North Dakota" -> "North_Dakota" following the change that fixes up dodgy names automatically.
This commit is contained in:
parent
b4e4b691fd
commit
5acf67a057
@ -127,14 +127,14 @@ void
|
||||
GeoIPTests::testXML2()
|
||||
{
|
||||
static const char data[] =
|
||||
"<Response><TimeZone>America/North Dakota/Beulah</TimeZone></Response>";
|
||||
"<Response><TimeZone>America/North Dakota/Beulah</TimeZone></Response>"; // 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") );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user