Module Name:    src
Committed By:   rillig
Date:           Sun Jan  9 20:21:44 UTC 2022

Modified Files:
        src/usr.bin/make/unit-tests: directive-if.exp directive-if.mk

Log Message:
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'.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/directive-if.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/directive-if.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-if.exp
diff -u src/usr.bin/make/unit-tests/directive-if.exp:1.8 src/usr.bin/make/unit-tests/directive-if.exp:1.9
--- src/usr.bin/make/unit-tests/directive-if.exp:1.8	Sat Dec 19 22:33:11 2020
+++ src/usr.bin/make/unit-tests/directive-if.exp	Sun Jan  9 20:21:44 2022
@@ -12,6 +12,7 @@ make: "directive-if.mk" line 70: Don't d
 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

Index: src/usr.bin/make/unit-tests/directive-if.mk
diff -u src/usr.bin/make/unit-tests/directive-if.mk:1.9 src/usr.bin/make/unit-tests/directive-if.mk:1.10
--- src/usr.bin/make/unit-tests/directive-if.mk:1.9	Sat Dec 19 22:33:11 2020
+++ src/usr.bin/make/unit-tests/directive-if.mk	Sun Jan  9 20:21:44 2022
@@ -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

Reply via email to