diff options
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/functions/call | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/scripts/functions/call b/tests/scripts/functions/call index a8834cd..efee476 100644 --- a/tests/scripts/functions/call +++ b/tests/scripts/functions/call @@ -69,4 +69,35 @@ $answer = "foo bar\ndefault file file\nb d f\n\n\nb\nbar foo baz\nfoo bar baz bl &compare_output($answer, &get_logfile(1)); + +# TEST eclipsing of arguments when invoking sub-calls + +$makefile2 = &get_tmpfile; + +open(MAKEFILE,"> $makefile2"); + +print MAKEFILE <<'EOF'; + +all = $1 $2 $3 $4 $5 $6 $7 $8 $9 + +level1 = $(call all,$1,$2,$3,$4,$5) +level2 = $(call level1,$1,$2,$3) +level3 = $(call level2,$1,$2,$3,$4,$5) + +all: + @echo $(call all,1,2,3,4,5,6,7,8,9,10,11) + @echo $(call level1,1,2,3,4,5,6,7,8) + @echo $(call level2,1,2,3,4,5,6,7,8) + @echo $(call level3,1,2,3,4,5,6,7,8) +EOF + +close(MAKEFILE); + +&run_make_with_options($makefile2, "", &get_logfile); + +# Create the answer to what should be produced by this Makefile +$answer = "1 2 3 4 5 6 7 8 9\n1 2 3 4 5\n1 2 3\n1 2 3\n"; + +&compare_output($answer,&get_logfile(1)); + 1; |