diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2012-11-26 07:39:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-26 14:30:09 +0100 |
commit | b34c48d95bf94f787fe693e28126e37a4bb485c1 (patch) | |
tree | c5bbb19a363f9b4e97d53112ba529ba9f8822db0 /tests | |
parent | a376e0e772177629aea5ff700fcfdeae5de3e9a3 (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.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") |