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: ensure that '.ifn' is an...
details: https://anonhg.NetBSD.org/src/rev/419857ebf88f
branches: trunk
changeset: 359565:419857ebf88f
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jan 09 20:21:44 2022 +0000
description:
tests/make: ensure that '.ifn' is an unknown directive
Due to the way DetermineKindOfConditional works, it could have been that
'.ifn' is treated like the negation of the plain '.if'.
diffstat:
usr.bin/make/unit-tests/directive-if.exp | 1 +
usr.bin/make/unit-tests/directive-if.mk | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r c7630f11bcec -r 419857ebf88f usr.bin/make/unit-tests/directive-if.exp
--- a/usr.bin/make/unit-tests/directive-if.exp Sun Jan 09 19:57:14 2022 +0000
+++ b/usr.bin/make/unit-tests/directive-if.exp Sun Jan 09 20:21:44 2022 +0000
@@ -12,6 +12,7 @@
make: "directive-if.mk" line 76: Don't do this, always put a space around comparison operators.
make: "directive-if.mk" line 82: Don't do this, always put a space after a directive.
make: "directive-if.mk" line 86: Don't do this, always put a space after a directive.
+make: "directive-if.mk" line 94: Unknown directive "ifn"
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r c7630f11bcec -r 419857ebf88f usr.bin/make/unit-tests/directive-if.mk
--- a/usr.bin/make/unit-tests/directive-if.mk Sun Jan 09 19:57:14 2022 +0000
+++ b/usr.bin/make/unit-tests/directive-if.mk Sun Jan 09 20:21:44 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: directive-if.mk,v 1.9 2020/12/19 22:33:11 rillig Exp $
+# $NetBSD: directive-if.mk,v 1.10 2022/01/09 20:21:44 rillig Exp $
#
# Tests for the .if directive.
#
@@ -86,4 +86,9 @@
. info Don't do this, always put a space after a directive.
.endif
-all:
+
+# The directives '.ifdef' and '.ifmake' can be negated by inserting an 'n'.
+# This doesn't work for a plain '.if' though.
+#
+# expect+1: Unknown directive "ifn"
+.ifn 0
Home |
Main Index |
Thread Index |
Old Index