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 tests/make: demonstrate .include wit...
details: https://anonhg.NetBSD.org/src/rev/f48fc350e54a
branches: trunk
changeset: 1026642:f48fc350e54a
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Dec 03 22:48:07 2021 +0000
description:
tests/make: demonstrate .include with erroneous expression
diffstat:
usr.bin/make/unit-tests/directive-include.exp | 2 ++
usr.bin/make/unit-tests/directive-include.mk | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r 9da91590281e -r f48fc350e54a usr.bin/make/unit-tests/directive-include.exp
--- a/usr.bin/make/unit-tests/directive-include.exp Fri Dec 03 22:43:50 2021 +0000
+++ b/usr.bin/make/unit-tests/directive-include.exp Fri Dec 03 22:48:07 2021 +0000
@@ -4,6 +4,8 @@
lhs = "directive-include.mk null", rhs = "directive-include.mk null", op = !=
make: "directive-include.mk" line 25: Could not find nonexistent.mk
make: "directive-include.mk" line 47: Could not find "
+make: "directive-include.mk" line 52: Unknown modifier "Z"
+make: "directive-include.mk" line 52: Could not find nonexistent.mk
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r 9da91590281e -r f48fc350e54a usr.bin/make/unit-tests/directive-include.mk
--- a/usr.bin/make/unit-tests/directive-include.mk Fri Dec 03 22:43:50 2021 +0000
+++ b/usr.bin/make/unit-tests/directive-include.mk Fri Dec 03 22:48:07 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: directive-include.mk,v 1.6 2021/12/03 22:43:50 rillig Exp $
+# $NetBSD: directive-include.mk,v 1.7 2021/12/03 22:48:07 rillig Exp $
#
# Tests for the .include directive, which includes another file.
@@ -46,4 +46,9 @@
DQUOT= "
.include "${DQUOT}"
+# When the expression in a filename cannot be evaluated, the failing
+# expression is skipped and the file is included nevertheless.
+# FIXME: Add proper error handling, no file must be included here.
+.include "nonexistent${:U123:Z}.mk"
+
all:
Home |
Main Index |
Thread Index |
Old Index