Make the test when your locale is not the locale the test expects
by simply setting the locale the test expects :D
commit29a72aeb3eb00a14ceb80f0f03e5b83ce3da1db5
authorAlbert Astals <albert.astals@canonical.com>
dateThu 9 Jan 2014, 12:19 (13 years ago)
parentdc8aa4d
tests/plugins/Utils/timeformattertest.cpp+11
@@ -21,6 +21,15 @@
2121#include <QtTest>
2222#include <QDebug>
2323
24+class LCALLSetter
25+{
26+public:
27+ LCALLSetter()
28+ {
29+ setenv("LC_ALL", "C", 1);
30+ }
31+};
32+
2433class TimeFormatterTest : public QObject
2534{
2635 Q_OBJECT
@@ -63,6 +72,8 @@ private Q_SLOTS:
6372 }
6473};
6574
75+static LCALLSetter setter;
76+
6677QTEST_GUILESS_MAIN(TimeFormatterTest)
6778
6879#include "timeformattertest.moc"