Module Name: src
Committed By: rillig
Date: Sun Dec 27 09:58:35 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: directive-for.exp directive-for.mk
Log Message:
make(1): add test for missing error handling in .for loop
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/directive-for.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/directive-for.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/directive-for.exp
diff -u src/usr.bin/make/unit-tests/directive-for.exp:1.7 src/usr.bin/make/unit-tests/directive-for.exp:1.8
--- src/usr.bin/make/unit-tests/directive-for.exp:1.7 Sun Nov 15 20:20:58 2020
+++ src/usr.bin/make/unit-tests/directive-for.exp Sun Dec 27 09:58:35 2020
@@ -16,4 +16,9 @@ make: "directive-for.mk" line 140: ][ ][
make: "directive-for.mk" line 140: }{ }{ }{
make: "directive-for.mk" line 148: outer value value
make: "directive-for.mk" line 148: outer "quoted" \"quoted\"
-exit status 0
+make: "directive-for.mk" line 154: Unknown modifier 'Z'
+make: "directive-for.mk" line 155: XXX: Not reached word1
+make: "directive-for.mk" line 155: XXX: Not reached word3
+make: Fatal errors encountered -- cannot continue
+make: stopped in unit-tests
+exit status 1
Index: src/usr.bin/make/unit-tests/directive-for.mk
diff -u src/usr.bin/make/unit-tests/directive-for.mk:1.9 src/usr.bin/make/unit-tests/directive-for.mk:1.10
--- src/usr.bin/make/unit-tests/directive-for.mk:1.9 Sun Nov 15 20:20:58 2020
+++ src/usr.bin/make/unit-tests/directive-for.mk Sun Dec 27 09:58:35 2020
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for.mk,v 1.9 2020/11/15 20:20:58 rillig Exp $
+# $NetBSD: directive-for.mk,v 1.10 2020/12/27 09:58:35 rillig Exp $
#
# Tests for the .for directive.
#
@@ -148,5 +148,12 @@ var= outer
. info ${var} ${var:Q} ${var:Q:Q}
.endfor
+
+# XXX: A parse error or evaluation error in the items of the .for loop
+# should skip the whole loop. As of 2020-12-27, the loop is expanded twice.
+.for var in word1 ${:Uword2:Z} word3
+. info XXX: Not reached ${var}
+.endfor
+
all:
@:;