From bf984d5f24741a52a70024f3f43432307281f0ae Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 9 May 2012 15:29:25 +0200 Subject: 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 --- tests/auto/tools/qmake/testdata/functions/functions.pro | 1 + tests/auto/tools/qmake/tst_qmake.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') 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() -- cgit v1.2.3