aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/cmd-errors-lint.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/cmd-errors-lint.mk')
-rw-r--r--contrib/bmake/unit-tests/cmd-errors-lint.mk23
1 files changed, 14 insertions, 9 deletions
diff --git a/contrib/bmake/unit-tests/cmd-errors-lint.mk b/contrib/bmake/unit-tests/cmd-errors-lint.mk
index 2e7d537f5f1f..f870fceaa5cb 100644
--- a/contrib/bmake/unit-tests/cmd-errors-lint.mk
+++ b/contrib/bmake/unit-tests/cmd-errors-lint.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cmd-errors-lint.mk,v 1.2 2024/04/23 22:51:28 rillig Exp $
+# $NetBSD: cmd-errors-lint.mk,v 1.4 2024/07/05 18:59:33 rillig Exp $
#
# Demonstrate how errors in expressions affect whether the commands
# are actually executed.
@@ -10,24 +10,29 @@ all: undefined unclosed-expression unclosed-modifier unknown-modifier end
# Undefined variables in expressions are not an error. They expand to empty
# strings.
undefined:
+# expect: : undefined
: $@ ${UNDEFINED}
-# XXX: As of 2020-11-01, this obvious syntax error is not detected.
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
unclosed-expression:
+# expect: make: in target "unclosed-expression": Unclosed variable "UNCLOSED"
+# XXX: This command is executed even though it contains parse errors.
+# expect: : unclosed-expression
: $@ ${UNCLOSED
-# XXX: As of 2020-11-01, this obvious syntax error is not detected.
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
unclosed-modifier:
+# expect: make: in target "unclosed-modifier": while evaluating variable "UNCLOSED" with value "": Unclosed expression, expecting '}'
+# XXX: This command is executed even though it contains parse errors.
+# expect: : unclosed-modifier
: $@ ${UNCLOSED:
-# XXX: As of 2020-11-01, this command is executed even though it contains
-# parse errors.
unknown-modifier:
+# expect: make: in target "unknown-modifier": while evaluating variable "UNKNOWN" with value "": Unknown modifier "Z"
+# XXX: This command is executed even though it contains parse errors.
+# expect: : unknown-modifier
: $@ ${UNKNOWN:Z}
end:
+# expect: : end
: $@
+
+# expect: exit status 2