Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests tests/make: disable test that behave...



details:   https://anonhg.NetBSD.org/src/rev/880b7f83c756
branches:  trunk
changeset: 1027634:880b7f83c756
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Dec 14 01:00:04 2021 +0000

description:
tests/make: disable test that behaves differently in ATF

diffstat:

 usr.bin/make/unit-tests/directive-include.exp |   1 -
 usr.bin/make/unit-tests/directive-include.mk  |  13 ++++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 8d6ca7039415 -r 880b7f83c756 usr.bin/make/unit-tests/directive-include.exp
--- a/usr.bin/make/unit-tests/directive-include.exp     Tue Dec 14 00:46:43 2021 +0000
+++ b/usr.bin/make/unit-tests/directive-include.exp     Tue Dec 14 01:00:04 2021 +0000
@@ -8,7 +8,6 @@
 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
diff -r 8d6ca7039415 -r 880b7f83c756 usr.bin/make/unit-tests/directive-include.mk
--- a/usr.bin/make/unit-tests/directive-include.mk      Tue Dec 14 00:46:43 2021 +0000
+++ b/usr.bin/make/unit-tests/directive-include.mk      Tue Dec 14 01:00:04 2021 +0000
@@ -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 /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:



Home | Main Index | Thread Index | Old Index