Module Name: src
Committed By: rillig
Date: Thu Nov 12 19:46:36 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: directive-elif.exp directive-elif.mk
directive-if.exp directive-if.mk
Log Message:
make(1): move test for missing space after .if to correct file
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/directive-elif.exp \
src/usr.bin/make/unit-tests/directive-if.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/directive-elif.mk \
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-elif.exp
diff -u src/usr.bin/make/unit-tests/directive-elif.exp:1.4 src/usr.bin/make/unit-tests/directive-elif.exp:1.5
--- src/usr.bin/make/unit-tests/directive-elif.exp:1.4 Thu Nov 12 19:45:24 2020
+++ src/usr.bin/make/unit-tests/directive-elif.exp Thu Nov 12 19:46:36 2020
@@ -12,9 +12,6 @@ make: "directive-elif.mk" line 57: Unkno
make: "directive-elif.mk" line 58: 2-elsif
make: "directive-elif.mk" line 64: if-less elif
make: "directive-elif.mk" line 69: warning: extra elif
-make: "directive-elif.mk" line 75: Don't do this, always put a space after a directive.
-make: "directive-elif.mk" line 79: Don't do this, always put a space after a directive.
-make: "directive-elif.mk" line 85: Don't do this, always put a space around comparison operators.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
Index: src/usr.bin/make/unit-tests/directive-if.exp
diff -u src/usr.bin/make/unit-tests/directive-if.exp:1.4 src/usr.bin/make/unit-tests/directive-if.exp:1.5
--- src/usr.bin/make/unit-tests/directive-if.exp:1.4 Tue Nov 10 22:23:37 2020
+++ src/usr.bin/make/unit-tests/directive-if.exp Thu Nov 12 19:46:36 2020
@@ -7,6 +7,9 @@ make: "directive-if.mk" line 40: Unknown
make: "directive-if.mk" line 41: if-less endif
make: "directive-if.mk" line 44: Malformed conditional ()
make: "directive-if.mk" line 54: Quotes in plain words are probably a mistake.
+make: "directive-if.mk" line 63: Don't do this, always put a space after a directive.
+make: "directive-if.mk" line 67: Don't do this, always put a space after a directive.
+make: "directive-if.mk" line 73: Don't do this, always put a space around comparison operators.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
Index: src/usr.bin/make/unit-tests/directive-elif.mk
diff -u src/usr.bin/make/unit-tests/directive-elif.mk:1.5 src/usr.bin/make/unit-tests/directive-elif.mk:1.6
--- src/usr.bin/make/unit-tests/directive-elif.mk:1.5 Thu Nov 12 19:45:24 2020
+++ src/usr.bin/make/unit-tests/directive-elif.mk Thu Nov 12 19:46:36 2020
@@ -1,4 +1,4 @@
-# $NetBSD: directive-elif.mk,v 1.5 2020/11/12 19:45:24 rillig Exp $
+# $NetBSD: directive-elif.mk,v 1.6 2020/11/12 19:46:36 rillig Exp $
#
# Tests for the .elif directive.
@@ -69,22 +69,4 @@
.elif
.endif
-.if0
-. error
-.else
-. info Don't do this, always put a space after a directive.
-.endif
-
-.if${:U-3}
-. info Don't do this, always put a space after a directive.
-.else
-. error
-.endif
-
-.if${:U-3}>-4
-. info Don't do this, always put a space around comparison operators.
-.else
-. error
-.endif
-
all:
Index: src/usr.bin/make/unit-tests/directive-if.mk
diff -u src/usr.bin/make/unit-tests/directive-if.mk:1.5 src/usr.bin/make/unit-tests/directive-if.mk:1.6
--- src/usr.bin/make/unit-tests/directive-if.mk:1.5 Tue Nov 10 22:23:37 2020
+++ src/usr.bin/make/unit-tests/directive-if.mk Thu Nov 12 19:46:36 2020
@@ -1,4 +1,4 @@
-# $NetBSD: directive-if.mk,v 1.5 2020/11/10 22:23:37 rillig Exp $
+# $NetBSD: directive-if.mk,v 1.6 2020/11/12 19:46:36 rillig Exp $
#
# Tests for the .if directive.
@@ -57,4 +57,22 @@
. error
.endif
+.if0
+. error
+.else
+. info Don't do this, always put a space after a directive.
+.endif
+
+.if${:U-3}
+. info Don't do this, always put a space after a directive.
+.else
+. error
+.endif
+
+.if${:U-3}>-4
+. info Don't do this, always put a space around comparison operators.
+.else
+. error
+.endif
+
all: