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 for missing error ...
details: https://anonhg.NetBSD.org/src/rev/dca878322167
branches: trunk
changeset: 1017409:dca878322167
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Dec 27 09:58:35 2020 +0000
description:
make(1): add test for missing error handling in .for loop
diffstat:
usr.bin/make/unit-tests/directive-for.exp | 7 ++++++-
usr.bin/make/unit-tests/directive-for.mk | 9 ++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r d721ec9b5adb -r dca878322167 usr.bin/make/unit-tests/directive-for.exp
--- a/usr.bin/make/unit-tests/directive-for.exp Sun Dec 27 05:16:26 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-for.exp Sun Dec 27 09:58:35 2020 +0000
@@ -16,4 +16,9 @@
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
diff -r d721ec9b5adb -r dca878322167 usr.bin/make/unit-tests/directive-for.mk
--- a/usr.bin/make/unit-tests/directive-for.mk Sun Dec 27 05:16:26 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-for.mk Sun Dec 27 09:58:35 2020 +0000
@@ -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 @@
. 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:
@:;
Home |
Main Index |
Thread Index |
Old Index