aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/cmd-errors-jobs.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/cmd-errors-jobs.mk')
-rw-r--r--contrib/bmake/unit-tests/cmd-errors-jobs.mk41
1 files changed, 24 insertions, 17 deletions
diff --git a/contrib/bmake/unit-tests/cmd-errors-jobs.mk b/contrib/bmake/unit-tests/cmd-errors-jobs.mk
index 8462a2e3497e..7a82c0b416e8 100644
--- a/contrib/bmake/unit-tests/cmd-errors-jobs.mk
+++ b/contrib/bmake/unit-tests/cmd-errors-jobs.mk
@@ -1,32 +1,39 @@
-# $NetBSD: cmd-errors-jobs.mk,v 1.1 2020/12/27 05:11:40 rillig Exp $
+# $NetBSD: cmd-errors-jobs.mk,v 1.4 2024/04/23 22:51:28 rillig Exp $
#
-# Demonstrate how errors in variable expansions affect whether the commands
+# Demonstrate how errors in expressions affect whether the commands
# are actually executed in jobs mode.
.MAKEFLAGS: -j1
-all: undefined unclosed-variable unclosed-modifier unknown-modifier end
+all: undefined unclosed-expression unclosed-modifier unknown-modifier end
-# Undefined variables are not an error. They expand to empty strings.
+# Undefined variables in expressions are not an error. They expand to empty
+# strings.
+# expect: : undefined--eol
undefined:
- : $@ ${UNDEFINED} eol
+ : $@-${UNDEFINED}-eol
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
-unclosed-variable:
- : $@ ${UNCLOSED
+# XXX: This command is executed even though it contains parse errors.
+# expect: make: in target "unclosed-expression": Unclosed variable "UNCLOSED"
+# expect: : unclosed-expression-
+unclosed-expression:
+ : $@-${UNCLOSED
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
+# XXX: This command is executed even though it contains parse errors.
+# expect: make: Unclosed expression, expecting '}' for "UNCLOSED"
+# expect: : unclosed-modifier-
unclosed-modifier:
- : $@ ${UNCLOSED:
+ : $@-${UNCLOSED:
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
+# XXX: This command is executed even though it contains parse errors.
+# expect: make: in target "unknown-modifier": while evaluating variable "UNKNOWN": Unknown modifier "Z"
+# expect: : unknown-modifier--eol
unknown-modifier:
- : $@ ${UNKNOWN:Z} eol
+ : $@-${UNKNOWN:Z}-eol
+# expect: : end-eol
end:
- : $@ eol
+ : $@-eol
-# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.
+# XXX: Despite the parse errors, the exit status is 0.
+# expect: exit status 0