Module Name:    src
Committed By:   rillig
Date:           Mon Jul 20 16:12:02 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: modmisc.exp modmisc.mk

Log Message:
make(1): add test for :tu modifier with spaces


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/unit-tests/modmisc.exp
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/modmisc.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/modmisc.exp
diff -u src/usr.bin/make/unit-tests/modmisc.exp:1.20 src/usr.bin/make/unit-tests/modmisc.exp:1.21
--- src/usr.bin/make/unit-tests/modmisc.exp:1.20	Mon Jul 20 14:50:41 2020
+++ src/usr.bin/make/unit-tests/modmisc.exp	Mon Jul 20 16:12:02 2020
@@ -78,4 +78,5 @@ mod-assign: appended=1 2 3.
 3
 mod-assign: ran:3.
 mod-assign: global: 1, 3, 1 2 3, 3.
+mod-tu-space: A   B
 exit status 0

Index: src/usr.bin/make/unit-tests/modmisc.mk
diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.16 src/usr.bin/make/unit-tests/modmisc.mk:1.17
--- src/usr.bin/make/unit-tests/modmisc.mk:1.16	Sun Jul 19 20:49:44 2020
+++ src/usr.bin/make/unit-tests/modmisc.mk	Mon Jul 20 16:12:02 2020
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.16 2020/07/19 20:49:44 rillig Exp $
+# $Id: modmisc.mk,v 1.17 2020/07/20 16:12:02 rillig Exp $
 #
 # miscellaneous modifier tests
 
@@ -20,6 +20,7 @@ all:	mod-S mod-C mod-at-varname mod-at-r
 all:	mod-subst-dollar mod-loop-dollar
 all:	mod-C-limits
 all:	mod-assign
+all:	mod-tu-space
 
 modsysv:
 	@echo "The answer is ${libfoo.a:L:libfoo.a=42}"
@@ -156,3 +157,9 @@ mod-assign:
 	# The assignments happen in the global scope and thus are
 	# preserved even after the shell command has been run.
 	@echo $@: global: ${FIRST:Q}, ${LAST:Q}, ${APPENDED:Q}, ${RAN:Q}.
+
+mod-tu-space:
+	# The :tu and :tl modifiers operate on the variable value
+	# as a single string, not as a list of words. Therefore,
+	# the adjacent spaces are preserved.
+	@echo $@: ${a   b:L:tu:Q}

Reply via email to