summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-02-20 18:14:55 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-21 15:28:40 +0100
commit848d3694f6603a5dd90977c0a0d73f7140633f33 (patch)
treed0e3ce29870137729782dfd69616e153d03ddc23 /tests
parent3f91cde588ad32277ba06d625ed36256ec65f88e (diff)
qmimetype: Fix test failure when LC_ALL is set.
This code sets LANG=en_US so that the method comment(), which returns a translated name, can be compared with an expected result in English. (QMimeType::comment uses QLocale::system().name() and QLocale::system().uiLanguages()) But LANG= has no effect if LC_ALL is set, so LC_ALL needs to be cleared (or set to en_US) for the test to work. Change-Id: Icb031057769be9bc8c0fcab65daa45e7bf1d5b18 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index fc86fa5431..858f977a72 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -51,6 +51,7 @@
void initializeLang()
{
+ qputenv("LC_ALL", "");
qputenv("LANG", "en_US");
}