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: test whitespace normaliz...



details:   https://anonhg.NetBSD.org/src/rev/50a3cb0f07c9
branches:  trunk
changeset: 379415:50a3cb0f07c9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun May 30 20:26:41 2021 +0000

description:
tests/make: test whitespace normalization for modifier ':u'

diffstat:

 usr.bin/make/unit-tests/varmod-unique.mk |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 6d690057415d -r 50a3cb0f07c9 usr.bin/make/unit-tests/varmod-unique.mk
--- a/usr.bin/make/unit-tests/varmod-unique.mk  Sun May 30 19:50:23 2021 +0000
+++ b/usr.bin/make/unit-tests/varmod-unique.mk  Sun May 30 20:26:41 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-unique.mk,v 1.4 2020/08/31 17:41:38 rillig Exp $
+# $NetBSD: varmod-unique.mk,v 1.5 2021/05/30 20:26:41 rillig Exp $
 #
 # Tests for the :u variable modifier, which discards adjacent duplicate
 # words.
@@ -15,10 +15,18 @@
 .  warning The :u modifier must do nothing with an empty word list.
 .endif
 
-.if ${:U1:u} != "1"
+.if ${:U   :u} != ""
+.  warning The modifier ':u' must normalize the whitespace.
+.endif
+
+.if ${:Uword:u} != "word"
 .  warning The :u modifier must do nothing with a single-element word list.
 .endif
 
+.if ${:U   word   :u} != "word"
+.  warning The modifier ':u' must normalize the whitespace.
+.endif
+
 .if ${:U1 1 1 1 1 1 1 1:u} != "1"
 .  warning The :u modifier must merge _all_ adjacent duplicate words.
 .endif



Home | Main Index | Thread Index | Old Index