diff options
Diffstat (limited to 'contrib/bmake/unit-tests/cmd-errors-lint.mk')
-rw-r--r-- | contrib/bmake/unit-tests/cmd-errors-lint.mk | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/contrib/bmake/unit-tests/cmd-errors-lint.mk b/contrib/bmake/unit-tests/cmd-errors-lint.mk index 371e12af0f4f..455ef2c0cfe7 100644 --- a/contrib/bmake/unit-tests/cmd-errors-lint.mk +++ b/contrib/bmake/unit-tests/cmd-errors-lint.mk @@ -1,32 +1,35 @@ -# $NetBSD: cmd-errors-lint.mk,v 1.1 2020/11/02 20:43:27 rillig Exp $ +# $NetBSD: cmd-errors-lint.mk,v 1.8 2025/06/28 22:39: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. .MAKEFLAGS: -dL -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. 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-variable: +unclosed-expression: +# expect: make: Unclosed variable "UNCLOSED" +# expect-not: : 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: Unclosed expression, expecting "}" +# expect-not: : unclosed-modifier : $@ ${UNCLOSED: -# XXX: As of 2020-11-01, this command is executed even though it contains -# parse errors. unknown-modifier: +# expect: make: Unknown modifier ":Z" +# expect-not: : unknown-modifier : $@ ${UNKNOWN:Z} end: +# expect: : end : $@ + +# expect: exit status 2 |