]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/cmd-errors.mk
Merge bmake-20201117
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / cmd-errors.mk
1 # $NetBSD: cmd-errors.mk,v 1.3 2020/11/09 23:36:34 rillig Exp $
2 #
3 # Demonstrate how errors in variable expansions affect whether the commands
4 # are actually executed.
5
6 all: undefined unclosed-variable unclosed-modifier unknown-modifier end
7
8 # Undefined variables are not an error.  They expand to empty strings.
9 undefined:
10         : $@ ${UNDEFINED} eol
11
12 # XXX: As of 2020-11-01, this command is executed even though it contains
13 # parse errors.
14 unclosed-variable:
15         : $@ ${UNCLOSED
16
17 # XXX: As of 2020-11-01, this command is executed even though it contains
18 # parse errors.
19 unclosed-modifier:
20         : $@ ${UNCLOSED:
21
22 # XXX: As of 2020-11-01, this command is executed even though it contains
23 # parse errors.
24 unknown-modifier:
25         : $@ ${UNKNOWN:Z} eol
26
27 end:
28         : $@ eol
29
30 # XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.