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 make(1): add test for assigning to ....
details: https://anonhg.NetBSD.org/src/rev/a0bae81a696d
branches: trunk
changeset: 976822:a0bae81a696d
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Oct 04 20:06:48 2020 +0000
description:
make(1): add test for assigning to .CURDIR
diffstat:
usr.bin/make/unit-tests/varname-dot-curdir.mk | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r 98a1b6d69c29 -r a0bae81a696d usr.bin/make/unit-tests/varname-dot-curdir.mk
--- a/usr.bin/make/unit-tests/varname-dot-curdir.mk Sun Oct 04 19:36:32 2020 +0000
+++ b/usr.bin/make/unit-tests/varname-dot-curdir.mk Sun Oct 04 20:06:48 2020 +0000
@@ -1,8 +1,25 @@
-# $NetBSD: varname-dot-curdir.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: varname-dot-curdir.mk,v 1.3 2020/10/04 20:06:48 rillig Exp $
#
# Tests for the special .CURDIR variable.
# TODO: Implementation
+# As of 2020-10-04, assigning the result of a shell command to .CURDIR tries
+# to add the shell command to the .PATH instead of the output of the shell
+# command. Since "echo /" does not exist, the .PATH is left unmodified.
+# See Parse_DoVar at the very bottom.
+.CURDIR!= echo /
+.if ${.PATH:M/}
+. error
+.endif
+
+# A normal assignment works fine, as does a substitution assignment.
+# Appending to .CURDIR does not make sense, therefore it doesn't matter that
+# this code path is buggy as well.
+.CURDIR= /
+.if !${.PATH:M/}
+. error
+.endif
+
all:
@:;
Home |
Main Index |
Thread Index |
Old Index