diff options
author | Paul Smith <psmith@gnu.org> | 2003-01-22 13:45:44 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2003-01-22 13:45:44 +0000 |
commit | d15a484098a52e0784933ba03a98445fdc86ea3f (patch) | |
tree | 2842543ad79b0bf854dbdb7a8fef9d95c0204402 /tests | |
parent | dd70c67ea48a0a5deca2358533110dc4bfc83dcc (diff) | |
download | gunmake-d15a484098a52e0784933ba03a98445fdc86ea3f.tar.gz |
Fix bug #1744: mask extra arguments to recursive invocations of $(call ...)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rw-r--r-- | tests/scripts/functions/call | 31 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index e91ccc9..2533bb8 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2003-01-22 Paul D. Smith <psmith@gnu.org> + + * scripts/functions/call: Test recursive argument masking (bug + #1744). + 2002-10-25 Paul D. Smith <psmith@gnu.org> * scripts/functions/eval: Test using $(eval ...) inside 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; |