qt6-bb10/tests/auto/corelib
Edward Welbourne 3cdf8debd1 Make sure to use C locale during time tests that assume it
Some format and parse tests for time and date-time depended on locale
but had test data for the C locale (so fail if the test-environment
has, e.g., LANG=de_DE@utf8).  So impose the C locale (until Qt 6).

The date-time test did *some* attempts at fixing for locale, but
failed to handle am/pm; and we do have "### Qt 6" comments in
Q(Date|Time)+::fromString indicating that we intend to switch these
methods to use the C locale by default (which shall fix this once and
for all).  So rip out the incomplete localization now and test we work
properly at least when the locale used *is* C.  Add a comment to the
matching QDate test to rip out its (presently adequate) matching code
once we do get to Qt 6 and make fromString() use the C locale.

QDateTimeParser uses systemLocale(), which is initialized the first
time it gets accessed; so we need to frob the locale *early*; doing so
in the test-class constructor is about as early as we conveniently
can; and seems to work (while doing it in individual tests does not).
(There is no point rolling back at the end; the QSystemLocale global
has been set up by then, so the roll-back would merely leave the
global out of sync with setlocale() and the environment.)

Task-number: QTBUG-58728
Change-Id: Ifa6778a80276050a099387a6dab15a1096be7561
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-20 08:48:46 +00:00
..
animation Stabilize tst_QPropertyAnimation::noStartValue() 2017-01-25 11:36:41 +00:00
codecs tst_utf8: remove duplicate nonCharacters() data 2017-01-10 18:39:31 +00:00
global tst_qhooks: test that it's possible to chain multiple hooks together 2016-11-18 15:22:32 +00:00
io QDir::mkpath: don't try to mkdir in automount filesystems 2017-02-16 21:08:32 +00:00
itemmodels QIPM: Persist model indexes after emitting layoutChange, not before 2016-12-21 01:37:50 +00:00
json Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-16 12:35:36 +01:00
kernel 50 ms isn't enough for the CI, so increase to 100 ms 2017-02-15 08:09:57 +00:00
mimetypes QMimeDatabase: fix matching of filenames with different length when lowercase 2017-02-17 18:52:50 +00:00
plugin Fix QLibrary::isLibrary on Apple platforms 2017-02-12 18:25:42 +00:00
statemachine Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
thread tst_QThreadPool: don't deadlock when a cancel() test fails 2017-02-15 11:25:48 +00:00
tools Make sure to use C locale during time tests that assume it 2017-02-20 08:48:46 +00:00
xml tests/auto/corelib/xml: cleanup 2016-08-27 05:09:16 +00:00
corelib.pro Add support for Apple tvOS 2016-05-17 16:11:23 +00:00