Module Name:    src
Committed By:   rillig
Date:           Tue Jul 28 18:25:33 UTC 2020

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

Log Message:
make(1): add tests for unknown indented directives

It's quite expected that the .${:Uinfo} is not yet expanded when the
directive is parsed, otherwise the directive would have been accepted.
The surprising thing is that it is expanded at the point where the error
message is generated.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/directives.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directives.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/directives.exp
diff -u src/usr.bin/make/unit-tests/directives.exp:1.3 src/usr.bin/make/unit-tests/directives.exp:1.4
--- src/usr.bin/make/unit-tests/directives.exp:1.3	Tue Jul 28 18:15:11 2020
+++ src/usr.bin/make/unit-tests/directives.exp	Tue Jul 28 18:25:33 2020
@@ -31,7 +31,11 @@ make: "directives.mk" line 132: Unknown 
 make: "directives.mk" line 133: 1 taken
 make: "directives.mk" line 134: Unknown directive "elsif"
 make: "directives.mk" line 135: 2 taken
-make: "directives.mk" line 140: end of the tests
+make: "directives.mk" line 140: Unknown directive "indented"
+make: "directives.mk" line 141: Unknown directive "indented"
+make: "directives.mk" line 142: Unknown directive "indented"
+make: "directives.mk" line 143: Unknown directive "info"
+make: "directives.mk" line 150: end of the tests
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/directives.mk
diff -u src/usr.bin/make/unit-tests/directives.mk:1.2 src/usr.bin/make/unit-tests/directives.mk:1.3
--- src/usr.bin/make/unit-tests/directives.mk:1.2	Tue Jul 28 17:47:57 2020
+++ src/usr.bin/make/unit-tests/directives.mk	Tue Jul 28 18:25:33 2020
@@ -1,4 +1,4 @@
-# $NetBSD: directives.mk,v 1.2 2020/07/28 17:47:57 rillig Exp $
+# $NetBSD: directives.mk,v 1.3 2020/07/28 18:25:33 rillig Exp $
 #
 # Tests for parsing directives, in the same order as in the manual page.
 #
@@ -137,6 +137,16 @@
 .info else taken
 .endif
 
+.indented none
+.  indented 2 spaces
+.	indented tab
+.${:Uinfo} directives cannot be indirect
+
+
+
+
+
+
 .info end of the tests
 
 all:

Reply via email to