summaryrefslogtreecommitdiff
path: root/usr.bin/make/unit-tests/cmd-errors.mk
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-11-09 23:36:34 +0000
committerrillig <rillig@NetBSD.org>2020-11-09 23:36:34 +0000
commit4d4d546268f1a27925f3cd96b2036a5d46545039 (patch)
tree418fc37a36074f511c998ef17a3caaa69e07c866 /usr.bin/make/unit-tests/cmd-errors.mk
parent93fbf3f5cdf116ff64a9feb66887f4c98b709c82 (diff)
make(1): add test that parsing continues after a parse error
Diffstat (limited to 'usr.bin/make/unit-tests/cmd-errors.mk')
-rw-r--r--usr.bin/make/unit-tests/cmd-errors.mk10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/make/unit-tests/cmd-errors.mk b/usr.bin/make/unit-tests/cmd-errors.mk
index f3905a4730c..5ad4be31187 100644
--- a/usr.bin/make/unit-tests/cmd-errors.mk
+++ b/usr.bin/make/unit-tests/cmd-errors.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cmd-errors.mk,v 1.2 2020/11/02 20:37:50 rillig Exp $
+# $NetBSD: cmd-errors.mk,v 1.3 2020/11/09 23:36:34 rillig Exp $
#
# Demonstrate how errors in variable expansions affect whether the commands
# are actually executed.
@@ -7,15 +7,13 @@ all: undefined unclosed-variable unclosed-modifier unknown-modifier end
# Undefined variables are not an error. They expand to empty strings.
undefined:
- : $@ ${UNDEFINED}
+ : $@ ${UNDEFINED} eol
-# 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
-# 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:
@@ -24,9 +22,9 @@ unclosed-modifier:
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
unknown-modifier:
- : $@ ${UNKNOWN:Z}
+ : $@ ${UNKNOWN:Z} eol
end:
- : $@
+ : $@ eol
# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.