Module Name: src
Committed By: rillig
Date: Sun May 8 10:14:41 UTC 2022
Modified Files:
src/usr.bin/make/unit-tests: varmod-quote-dollar.exp
varmod-quote-dollar.mk
Log Message:
tests/make: explain that assignments ignore leading spaces
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-quote-dollar.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-quote-dollar.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/varmod-quote-dollar.exp
diff -u src/usr.bin/make/unit-tests/varmod-quote-dollar.exp:1.2 src/usr.bin/make/unit-tests/varmod-quote-dollar.exp:1.3
--- src/usr.bin/make/unit-tests/varmod-quote-dollar.exp:1.2 Sat Jan 22 17:10:51 2022
+++ src/usr.bin/make/unit-tests/varmod-quote-dollar.exp Sun May 8 10:14:40 2022
@@ -1,2 +1,4 @@
!"#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
+!"#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
+ !"#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
exit status 0
Index: src/usr.bin/make/unit-tests/varmod-quote-dollar.mk
diff -u src/usr.bin/make/unit-tests/varmod-quote-dollar.mk:1.3 src/usr.bin/make/unit-tests/varmod-quote-dollar.mk:1.4
--- src/usr.bin/make/unit-tests/varmod-quote-dollar.mk:1.3 Sat Jan 22 17:10:51 2022
+++ src/usr.bin/make/unit-tests/varmod-quote-dollar.mk Sun May 8 10:14:40 2022
@@ -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