Module Name: src
Committed By: rillig
Date: Mon Nov 9 23:36:34 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: cmd-errors.exp cmd-errors.mk
Log Message:
make(1): add test that parsing continues after a parse error
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/cmd-errors.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/cmd-errors.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/cmd-errors.exp
diff -u src/usr.bin/make/unit-tests/cmd-errors.exp:1.3 src/usr.bin/make/unit-tests/cmd-errors.exp:1.4
--- src/usr.bin/make/unit-tests/cmd-errors.exp:1.3 Mon Nov 2 20:48:36 2020
+++ src/usr.bin/make/unit-tests/cmd-errors.exp Mon Nov 9 23:36:34 2020
@@ -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
Index: src/usr.bin/make/unit-tests/cmd-errors.mk
diff -u src/usr.bin/make/unit-tests/cmd-errors.mk:1.2 src/usr.bin/make/unit-tests/cmd-errors.mk:1.3
--- src/usr.bin/make/unit-tests/cmd-errors.mk:1.2 Mon Nov 2 20:37:50 2020
+++ src/usr.bin/make/unit-tests/cmd-errors.mk Mon Nov 9 23:36:34 2020
@@ -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 unclose
# 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.