summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlocale/tst_qlocale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qlocale/tst_qlocale.cpp')
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp
index 3dc4dadc59..5a87154ea6 100644
--- a/tests/auto/qlocale/tst_qlocale.cpp
+++ b/tests/auto/qlocale/tst_qlocale.cpp
@@ -1017,6 +1017,9 @@ void tst_QLocale::toDateTime_data()
QTest::newRow("RFC-1123") << "C" << QDateTime(QDate(2007, 11, 1), QTime(18, 8, 30))
<< "ddd, dd MMM yyyy hh:mm:ss 'GMT'" << "Thu, 01 Nov 2007 18:08:30 GMT";
+
+ QTest::newRow("longFormat") << "en_US" << QDateTime(QDate(2009, 1, 5), QTime(11, 48, 32))
+ << "dddd, MMMM d, yyyy h:mm:ss AP " << "Monday, January 5, 2009 11:48:32 AM ";
}
void tst_QLocale::toDateTime()
@@ -1028,6 +1031,8 @@ void tst_QLocale::toDateTime()
QLocale l(localeName);
QCOMPARE(l.toDateTime(string, format), result);
+ if (l.dateTimeFormat(QLocale::LongFormat) == format)
+ QCOMPARE(l.toDateTime(string, QLocale::LongFormat), result);
}
void tst_QLocale::macDefaultLocale()