diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-05-09 15:29:25 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-06-19 16:39:56 +0200 |
commit | bf984d5f24741a52a70024f3f43432307281f0ae (patch) | |
tree | 6197ea782c8dce78fcdd260d34e4ed07b175aa12 /tests/auto | |
parent | 6a66fef520d0fb2b8d507c3e91e03338fc39a57e (diff) |
add $$shadowed() function
return the build directory corresponding to a given source directory.
this is the identity function if not shadow-building. if input lies
outside the source directory, return empty value.
Change-Id: I2d2a6b1112bd19989fe29cfe19a12d39a0d208c1
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/tools/qmake/testdata/functions/functions.pro | 1 | ||||
-rw-r--r-- | tests/auto/tools/qmake/tst_qmake.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/tools/qmake/testdata/functions/functions.pro b/tests/auto/tools/qmake/testdata/functions/functions.pro index 7792859327..0b70b24158 100644 --- a/tests/auto/tools/qmake/testdata/functions/functions.pro +++ b/tests/auto/tools/qmake/testdata/functions/functions.pro @@ -112,3 +112,4 @@ in = easy "less easy" sca$${LITERAL_HASH}ry crazy$$escape_expand(\\t\\r\\n) $$es out = "easy \"less easy\" sca\$\${LITERAL_HASH}ry crazy\$\$escape_expand(\\\\t\\\\r\\\\n) \$\$escape_expand(\\\\t)shit \\\'no\\\"way\\\\here" testReplace($$val_escape(in), $$out, "val_escape") +testReplace($$shadowed($$PWD/something), $$OUT_PWD/something, "shadowed") diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index 88ff10a764..1cdf0d7c7e 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -250,7 +250,8 @@ void tst_qmake::subdir_via_pro_file_extra_target() void tst_qmake::functions() { QString workDir = base_path + "/testdata/functions"; - QVERIFY( test_compiler.qmake( workDir, "functions" )); + QString buildDir = base_path + "/testdata/functions_build"; + QVERIFY( test_compiler.qmake( workDir, "functions", buildDir )); } void tst_qmake::operators() |