From 848d3694f6603a5dd90977c0a0d73f7140633f33 Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 20 Feb 2012 18:14:55 +0100 Subject: 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 --- tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp | 1 + 1 file changed, 1 insertion(+) 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"); } -- cgit v1.2.3