summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmakelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tools/qmakelib')
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp10
-rw-r--r--tests/auto/tools/qmakelib/testdata/include/inc.pri4
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index 01214b3d38..614568ee53 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -2326,8 +2326,14 @@ void tst_qmakelib::addTestFunctions(const QString &qindir)
<< true;
QTest::newRow("discard_from()")
- << "HERE = 1\nPLUS = one\ninclude(include/inc.pri)\ndiscard_from(include/inc.pri): OK = 1"
- << "OK = 1\nHERE = 1\nPLUS = one\nVAR = UNDEF"
+ << "HERE = 1\nPLUS = one\n"
+ "defineTest(tfunc) {}\ndefineReplace(rfunc) {}\n"
+ "include(include/inc.pri)\n"
+ "discard_from(include/inc.pri): OK = 1\n"
+ "defined(tfunc, test): TDEF = 1\ndefined(rfunc, replace): RDEF = 1\n"
+ "defined(func, test): DTDEF = 1\ndefined(func, replace): DRDEF = 1\n"
+ << "OK = 1\nHERE = 1\nPLUS = one\nVAR = UNDEF\n"
+ "TDEF = 1\nRDEF = 1\nDTDEF = UNDEF\nDRDEF = UNDEF"
<< ""
<< true;
diff --git a/tests/auto/tools/qmakelib/testdata/include/inc.pri b/tests/auto/tools/qmakelib/testdata/include/inc.pri
index f9a4ec1bfa..5c570f49e5 100644
--- a/tests/auto/tools/qmakelib/testdata/include/inc.pri
+++ b/tests/auto/tools/qmakelib/testdata/include/inc.pri
@@ -8,3 +8,7 @@ fake-*: MATCH = 1
defineTest(func) {
message("say hi!")
}
+
+defineReplace(func) {
+ return("say hi!")
+}