Module Name:    src
Committed By:   rillig
Date:           Tue Dec 14 01:00:04 UTC 2021

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

Log Message:
tests/make: disable test that behaves differently in ATF


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/directive-include.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/directive-include.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-include.exp
diff -u src/usr.bin/make/unit-tests/directive-include.exp:1.7 src/usr.bin/make/unit-tests/directive-include.exp:1.8
--- src/usr.bin/make/unit-tests/directive-include.exp:1.7	Tue Dec 14 00:38:32 2021
+++ src/usr.bin/make/unit-tests/directive-include.exp	Tue Dec 14 01:00:04 2021
@@ -8,7 +8,6 @@ make: "directive-include.mk" line 52: Un
 make: "directive-include.mk" line 52: Could not find nonexistent.mk
 make: "directive-include.mk" line 57: Cannot open /nonexistent
 make: "directive-include.mk" line 62: Invalid line type
-make: "directive-include.mk" line 65: Could not find 
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/directive-include.mk
diff -u src/usr.bin/make/unit-tests/directive-include.mk:1.8 src/usr.bin/make/unit-tests/directive-include.mk:1.9
--- src/usr.bin/make/unit-tests/directive-include.mk:1.8	Tue Dec 14 00:38:32 2021
+++ src/usr.bin/make/unit-tests/directive-include.mk	Tue Dec 14 01:00:04 2021
@@ -1,4 +1,4 @@
-# $NetBSD: directive-include.mk,v 1.8 2021/12/14 00:38:32 rillig Exp $
+# $NetBSD: directive-include.mk,v 1.9 2021/12/14 01:00:04 rillig Exp $
 #
 # Tests for the .include directive, which includes another file.
 
@@ -60,8 +60,15 @@ include ${:U/dev/null}		# comment
 include /dev/null /dev/null
 # expect+1: Invalid line type
 include
+
 # XXX: trailing whitespace in diagnostic, missing quotes around filename
-# expect+1: Could not find
-include ${:U}
+### expect+1: Could not find
+# The following include directive behaves differently, depending on whether
+# the current file has a slash or is a relative filename.  In the first case,
+# make opens the directory of the current file and tries to read from it,
+# resulting in the error message """ line 1: Zero byte read from file".
+# In the second case, the error message is "Could not find ", without quotes
+# or any other indicator for the empty filename at the end of the line.
+#include ${:U}
 
 all:

Reply via email to