qmake: Test recursive function calls
Change-Id: If7d659728d30b2e5c52082ab999bc00de3733972 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
a376e0e772
commit
b34c48d95b
@ -88,6 +88,20 @@ myTestFunction("oink baa moo")
|
|||||||
message("FAILED: myTestFunction: $$RESULT")
|
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"
|
moo = "this is a test" "for real"
|
||||||
fn = $$OUT_PWD/testdir/afile
|
fn = $$OUT_PWD/testdir/afile
|
||||||
write_file($$fn, moo)|message("FAILED: write_file() failed")
|
write_file($$fn, moo)|message("FAILED: write_file() failed")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user