Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests make(1): add test that parsing conti...
details: https://anonhg.NetBSD.org/src/rev/58e91891ccfa
branches: trunk
changeset: 942527:58e91891ccfa
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Nov 09 23:36:34 2020 +0000
description:
make(1): add test that parsing continues after a parse error
diffstat:
usr.bin/make/unit-tests/cmd-errors.exp | 6 +++---
usr.bin/make/unit-tests/cmd-errors.mk | 10 ++++------
2 files changed, 7 insertions(+), 9 deletions(-)
diffs (54 lines):
diff -r 822dc9297add -r 58e91891ccfa usr.bin/make/unit-tests/cmd-errors.exp
--- a/usr.bin/make/unit-tests/cmd-errors.exp Mon Nov 09 22:36:44 2020 +0000
+++ b/usr.bin/make/unit-tests/cmd-errors.exp Mon Nov 09 23:36:34 2020 +0000
@@ -1,9 +1,9 @@
-: undefined
+: undefined eol
make: Unclosed variable "UNCLOSED"
: unclosed-variable
make: Unclosed variable expression (expecting '}') for "UNCLOSED"
: unclosed-modifier
make: Unknown modifier 'Z'
-: unknown-modifier
-: end
+: unknown-modifier eol
+: end eol
exit status 0
diff -r 822dc9297add -r 58e91891ccfa usr.bin/make/unit-tests/cmd-errors.mk
--- a/usr.bin/make/unit-tests/cmd-errors.mk Mon Nov 09 22:36:44 2020 +0000
+++ b/usr.bin/make/unit-tests/cmd-errors.mk Mon Nov 09 23:36:34 2020 +0000
@@ -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 @@
# 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 @@
# 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.
Home |
Main Index |
Thread Index |
Old Index