diff options
Diffstat (limited to 'tests/auto/tools')
-rw-r--r-- | tests/auto/tools/qmake/testdata/functions/functions.pro | 14 |
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") |