summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-11-26 07:39:34 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-26 14:30:09 +0100
commitb34c48d95bf94f787fe693e28126e37a4bb485c1 (patch)
treec5bbb19a363f9b4e97d53112ba529ba9f8822db0 /tests
parenta376e0e772177629aea5ff700fcfdeae5de3e9a3 (diff)
qmake: Test recursive function calls
Change-Id: If7d659728d30b2e5c52082ab999bc00de3733972 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/tools/qmake/testdata/functions/functions.pro14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/tools/qmake/testdata/functions/functions.pro b/tests/auto/tools/qmake/testdata/functions/functions.pro
index 32a9b6a137..bf1344eb68 100644
--- a/tests/auto/tools/qmake/testdata/functions/functions.pro
+++ b/tests/auto/tools/qmake/testdata/functions/functions.pro
@@ -88,6 +88,20 @@ myTestFunction("oink baa moo")
message("FAILED: myTestFunction: $$RESULT")
}
+#recursive
+defineReplace(myRecursiveReplaceFunction) {
+ RESULT =
+ list = $$1
+ RESULT += $$member(list, 0)
+ list -= $$RESULT
+ !isEmpty(list):RESULT += $$myRecursiveReplaceFunction($$list)
+ return($$RESULT)
+}
+RESULT = $$myRecursiveReplaceFunction(oink baa moo)
+!isEqual(RESULT, "oink baa moo") {
+ message( "FAILED: myRecursiveReplaceFunction [$$RESULT] != oink baa moo" )
+}
+
moo = "this is a test" "for real"
fn = $$OUT_PWD/testdir/afile
write_file($$fn, moo)|message("FAILED: write_file() failed")