aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/varmod-quote-dollar.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/varmod-quote-dollar.mk')
-rw-r--r--contrib/bmake/unit-tests/varmod-quote-dollar.mk11
1 files changed, 9 insertions, 2 deletions
diff --git a/contrib/bmake/unit-tests/varmod-quote-dollar.mk b/contrib/bmake/unit-tests/varmod-quote-dollar.mk
index 3316b04bed1e..8e68282c536d 100644
--- a/contrib/bmake/unit-tests/varmod-quote-dollar.mk
+++ b/contrib/bmake/unit-tests/varmod-quote-dollar.mk
@@ -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