diff options
Diffstat (limited to 'contrib/bmake/unit-tests/cmd-errors.mk')
-rw-r--r-- | contrib/bmake/unit-tests/cmd-errors.mk | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/contrib/bmake/unit-tests/cmd-errors.mk b/contrib/bmake/unit-tests/cmd-errors.mk index 6d3880684bcf..d9525df6064e 100644 --- a/contrib/bmake/unit-tests/cmd-errors.mk +++ b/contrib/bmake/unit-tests/cmd-errors.mk @@ -1,30 +1,36 @@ -# $NetBSD: cmd-errors.mk,v 1.5 2022/09/25 12:51:37 rillig Exp $ +# $NetBSD: cmd-errors.mk,v 1.9 2024/07/09 19:43:01 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 compat mode. -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--eol : $@-${UNDEFINED}-eol -# XXX: As of 2020-11-01, this command is executed even though it contains -# parse errors. -unclosed-variable: +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 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--eol : $@-${UNKNOWN:Z}-eol end: +# expect: : end-eol : $@-eol -# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0. +# expect: exit status 2 |