Module Name: src
Committed By: rillig
Date: Tue Jul 28 20:57:59 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: directives.exp directives.mk
Log Message:
make(1): add test for including a nonexistent or empty file
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/directives.exp \
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.4 src/usr.bin/make/unit-tests/directives.exp:1.5
--- src/usr.bin/make/unit-tests/directives.exp:1.4 Tue Jul 28 18:25:33 2020
+++ src/usr.bin/make/unit-tests/directives.exp Tue Jul 28 20:57:59 2020
@@ -35,7 +35,8 @@ make: "directives.mk" line 140: Unknown
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: "directives.mk" line 150: Could not find nonexistent.mk
+make: "directives.mk" line 160: 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.4 src/usr.bin/make/unit-tests/directives.mk:1.5
--- src/usr.bin/make/unit-tests/directives.mk:1.4 Tue Jul 28 19:19:30 2020
+++ src/usr.bin/make/unit-tests/directives.mk Tue Jul 28 20:57:59 2020
@@ -1,4 +1,4 @@
-# $NetBSD: directives.mk,v 1.4 2020/07/28 19:19:30 rillig Exp $
+# $NetBSD: directives.mk,v 1.5 2020/07/28 20:57:59 rillig Exp $
#
# Tests for parsing directives, in the same order as in the manual page.
#
@@ -147,6 +147,16 @@
+.include "nonexistent.mk"
+.include "/dev/null" # size 0
+# including a directory technically succeeds, but shouldn't.
+#.include "." # directory
+
+
+
+
+
+
.info end of the tests
all: