xref: /freebsd/contrib/bmake/unit-tests/cmd-errors.mk (revision 548bfc56eb0b2cefa0fb8dc2478240bfef610309)
1*548bfc56SSimon J. Gerraty# $NetBSD: cmd-errors.mk,v 1.6 2024/04/23 22:51:28 rillig Exp $
2e2eeea75SSimon J. Gerraty#
3*548bfc56SSimon J. Gerraty# Demonstrate how errors in expressions affect whether the commands
406b9b3e0SSimon J. Gerraty# are actually executed in compat mode.
5e2eeea75SSimon J. Gerraty
6*548bfc56SSimon J. Gerratyall: undefined unclosed-expression unclosed-modifier unknown-modifier end
7e2eeea75SSimon J. Gerraty
8*548bfc56SSimon J. Gerraty# Undefined variables in expressions are not an error.  They expand to empty
9*548bfc56SSimon J. Gerraty# strings.
10e2eeea75SSimon J. Gerratyundefined:
114fde40d9SSimon J. Gerraty	: $@-${UNDEFINED}-eol
12e2eeea75SSimon J. Gerraty
13e2eeea75SSimon J. Gerraty# XXX: As of 2020-11-01, this command is executed even though it contains
14e2eeea75SSimon J. Gerraty# parse errors.
15*548bfc56SSimon J. Gerratyunclosed-expression:
164fde40d9SSimon J. Gerraty	: $@-${UNCLOSED
17e2eeea75SSimon J. Gerraty
18e2eeea75SSimon J. Gerraty# XXX: As of 2020-11-01, this command is executed even though it contains
19e2eeea75SSimon J. Gerraty# parse errors.
20e2eeea75SSimon J. Gerratyunclosed-modifier:
214fde40d9SSimon J. Gerraty	: $@-${UNCLOSED:
22e2eeea75SSimon J. Gerraty
23e2eeea75SSimon J. Gerraty# XXX: As of 2020-11-01, this command is executed even though it contains
24e2eeea75SSimon J. Gerraty# parse errors.
25e2eeea75SSimon J. Gerratyunknown-modifier:
264fde40d9SSimon J. Gerraty	: $@-${UNKNOWN:Z}-eol
27e2eeea75SSimon J. Gerraty
28e2eeea75SSimon J. Gerratyend:
294fde40d9SSimon J. Gerraty	: $@-eol
30e2eeea75SSimon J. Gerraty
31e2eeea75SSimon J. Gerraty# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.
32