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: explain that assignments...
details: https://anonhg.NetBSD.org/src/rev/d5eaa336b093
branches: trunk
changeset: 366001:d5eaa336b093
user: rillig <rillig%NetBSD.org@localhost>
date: Sun May 08 10:14:40 2022 +0000
description:
tests/make: explain that assignments ignore leading spaces
diffstat:
usr.bin/make/unit-tests/varmod-quote-dollar.exp | 2 ++
usr.bin/make/unit-tests/varmod-quote-dollar.mk | 11 +++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 2a57d416a824 -r d5eaa336b093 usr.bin/make/unit-tests/varmod-quote-dollar.exp
--- a/usr.bin/make/unit-tests/varmod-quote-dollar.exp Sun May 08 08:20:16 2022 +0000
+++ b/usr.bin/make/unit-tests/varmod-quote-dollar.exp Sun May 08 10:14:40 2022 +0000
@@ -1,2 +1,4 @@
!"#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
+!"#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
+ !"#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
exit status 0
diff -r 2a57d416a824 -r d5eaa336b093 usr.bin/make/unit-tests/varmod-quote-dollar.mk
--- a/usr.bin/make/unit-tests/varmod-quote-dollar.mk Sun May 08 08:20:16 2022 +0000
+++ b/usr.bin/make/unit-tests/varmod-quote-dollar.mk Sun May 08 10:14:40 2022 +0000
@@ -1,10 +1,17 @@
-# $NetBSD: varmod-quote-dollar.mk,v 1.3 2022/01/22 17:10:51 rillig Exp $
+# $NetBSD: varmod-quote-dollar.mk,v 1.4 2022/05/08 10:14:40 rillig Exp $
#
# Tests for the :q variable modifier, which quotes the string for the shell
# and doubles dollar signs, to prevent them from being interpreted by a
# child process of make.
+# The newline and space characters at the beginning of this string are passed
+# to the child make. When the child make parses the variable assignment, it
+# discards the leading space characters.
ASCII_CHARS= ${.newline} !"\#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
all:
- @${MAKE} -r -f /dev/null CHARS=${ASCII_CHARS:q} -V CHARS
+ @${MAKE} -r -f /dev/null \
+ CHARS=${ASCII_CHARS:q} \
+ TWICE=${ASCII_CHARS:q}${ASCII_CHARS:q} \
+ -V CHARS \
+ -V TWICE
Home |
Main Index |
Thread Index |
Old Index