diff options
author | Paul Smith <psmith@gnu.org> | 2006-02-15 23:54:42 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2006-02-15 23:54:42 +0000 |
commit | 0806a403d65ef6a7f16e2c17aa8286100ebad5d7 (patch) | |
tree | efb7503681a70739ad6e4659ebefc701975ced7f /tests/scripts/functions/foreach | |
parent | 86af3872a910e314d20ef911fad1819ad90c1291 (diff) | |
download | gunmake-0806a403d65ef6a7f16e2c17aa8286100ebad5d7.tar.gz |
Fix Savannah bug #106: keep separate track of which variable we are
expanding, and use that info when generating error messages instead of
the file info, where appropriate.
Diffstat (limited to 'tests/scripts/functions/foreach')
-rw-r--r-- | tests/scripts/functions/foreach | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/scripts/functions/foreach b/tests/scripts/functions/foreach index 1fde12e..904c160 100644 --- a/tests/scripts/functions/foreach +++ b/tests/scripts/functions/foreach @@ -57,4 +57,25 @@ $(foreach x,FOREACH,$(eval $(value mktarget)))', '', 'FOREACH'); + +# TEST 2: Check some error conditions. + +run_make_test(' +x = $(foreach ) +y = $x + +all: ; @echo $y', + '', + "#MAKEFILE#:2: *** insufficient number of arguments (1) to function `foreach'. Stop.", + 512); + +run_make_test(' +x = $(foreach ) +y := $x + +all: ; @echo $y', + '', + "#MAKEFILE#:2: *** insufficient number of arguments (1) to function `foreach'. Stop.", + 512); + 1; |