summaryrefslogtreecommitdiff
path: root/tests/scripts/functions/foreach
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/functions/foreach')
-rw-r--r--tests/scripts/functions/foreach21
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;