summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-05 08:12:33 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-05 08:12:33 (GMT)
commitd1ac6af4f30e822e161fd8772104aa2e30e55a2f (patch)
tree71cb36a09e4d9051a40bbeccb5ae4467bb1f7792 /tests
parentc98eafb1b6b100cf99518b33b8155aff866eb208 (diff)
parentc79246683a5033f605acd59d1c37d68381383a06 (diff)
downloadQt-d1ac6af4f30e822e161fd8772104aa2e30e55a2f.zip
Qt-d1ac6af4f30e822e161fd8772104aa2e30e55a2f.tar.gz
Qt-d1ac6af4f30e822e161fd8772104aa2e30e55a2f.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: don't crash in QProcessEnvironment::systemEnvironment() qmake: Introduce new template type no environment on WinCE fix Widestring vs. Ansi mixup fix potential crash in QProcessEnvironment::systemEnvironment() on windows Fix compilation with QT_NO_* fix build on symbian skip widget when its focusPolicy is Qt::ClickFocus in TabOrderEditor fix build on mac make QProcessEnvironment on Unix cache converted values make QProcessEnvironment::systemEnvironment() encoding-safe make QProcessEnvironment on Unix cache converted variable names move key/value converters to the private class make QProcessEnvironment on Windows preserve variable name case split QProcessEnvironmentPrivate::Unit into Key and Value remove unused functions minor optimization: use QList::reserve() use the Hash typedef Changelog: Qt Designer 4.8
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp
index 1c26343..98d4890 100644
--- a/tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -43,10 +43,6 @@
#include <QObject>
#include <QProcessEnvironment>
-// Note:
-// in cross-platform tests, ALWAYS use UPPERCASE variable names
-// That's because on Windows, the variables are uppercased
-
class tst_QProcessEnvironment: public QObject
{
Q_OBJECT
@@ -214,7 +210,7 @@ void tst_QProcessEnvironment::caseSensitivity()
e.insert("foo", "bar");
#ifdef Q_OS_WIN
- // on Windows, it's uppercased
+ // Windows is case-insensitive, but case-preserving
QVERIFY(e.contains("foo"));
QVERIFY(e.contains("FOO"));
QVERIFY(e.contains("FoO"));
@@ -223,8 +219,12 @@ void tst_QProcessEnvironment::caseSensitivity()
QCOMPARE(e.value("FOO"), QString("bar"));
QCOMPARE(e.value("FoO"), QString("bar"));
+ // Per Windows, this overwrites the value, but keeps the name's original capitalization
+ e.insert("Foo", "Bar");
+
QStringList list = e.toStringList();
- QCOMPARE(list.at(0), QString("FOO=bar"));
+ QCOMPARE(list.length(), 1);
+ QCOMPARE(list.at(0), QString("foo=Bar"));
#else
// otherwise, it's case sensitive
QVERIFY(e.contains("foo"));
@@ -236,6 +236,7 @@ void tst_QProcessEnvironment::caseSensitivity()
QCOMPARE(e.value("foo"), QString("bar"));
QStringList list = e.toStringList();
+ QCOMPARE(list.length(), 2);
QVERIFY(list.contains("foo=bar"));
QVERIFY(list.contains("FOO=baz"));
#endif