summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmake
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-02-11 10:42:03 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-11 13:30:31 +0100
commit7a7d82ffd9fac842fb573aad4fe28e27bc879f91 (patch)
tree4ed203367b9e2e4e4a49421f4241a7305ccf3e0a /tests/auto/tools/qmake
parent8b7a9b4898c85e81d87cf642ec59ce85e917ee35 (diff)
Implement QMAKE_SUBSTITUTES.config = verbatim.
Change-Id: Ie0b333fa7fae2283e99e42f9cd7bab4e84991f40 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tests/auto/tools/qmake')
-rw-r--r--tests/auto/tools/qmake/testdata/substitutes/copy.txt3
-rw-r--r--tests/auto/tools/qmake/testdata/substitutes/test.pro5
-rw-r--r--tests/auto/tools/qmake/tst_qmake.cpp8
3 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/tools/qmake/testdata/substitutes/copy.txt b/tests/auto/tools/qmake/testdata/substitutes/copy.txt
new file mode 100644
index 0000000000..65e5840739
--- /dev/null
+++ b/tests/auto/tools/qmake/testdata/substitutes/copy.txt
@@ -0,0 +1,3 @@
+This file is $processed verbatim. It's not going to "warn about
+
+anything that is usually substituted in qmake such as $${PWD}.
diff --git a/tests/auto/tools/qmake/testdata/substitutes/test.pro b/tests/auto/tools/qmake/testdata/substitutes/test.pro
index 26b02722e8..65bb2d85bf 100644
--- a/tests/auto/tools/qmake/testdata/substitutes/test.pro
+++ b/tests/auto/tools/qmake/testdata/substitutes/test.pro
@@ -1,5 +1,8 @@
-QMAKE_SUBSTITUTES += test.in sub/test2.in indirect
+QMAKE_SUBSTITUTES += test.in sub/test2.in indirect copy
indirect.input = $$PWD/test3.txt
indirect.output = $$OUT_PWD/sub/indirect_test.txt
+copy.input = $$PWD/copy.txt
+copy.output = $$OUT_PWD/copy_test.txt
+copy.config = verbatim
diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp
index fcebd6b821..4da781f763 100644
--- a/tests/auto/tools/qmake/tst_qmake.cpp
+++ b/tests/auto/tools/qmake/tst_qmake.cpp
@@ -510,6 +510,14 @@ void tst_qmake::substitutes()
QVERIFY( test_compiler.exists( buildDir, "test", Plain, "" ));
QVERIFY( test_compiler.exists( buildDir, "sub/test2", Plain, "" ));
QVERIFY( test_compiler.exists( buildDir, "sub/indirect_test.txt", Plain, "" ));
+
+ QFile copySource(workDir + "/copy.txt");
+ QFile copyDestination(buildDir + "/copy_test.txt");
+
+ QVERIFY(copySource.open(QFile::ReadOnly));
+ QVERIFY(copyDestination.open(QFile::ReadOnly));
+ QCOMPARE(copySource.readAll(), copyDestination.readAll());
+
QVERIFY( test_compiler.makeDistClean( buildDir ));
}