Module Name: src Committed By: rillig Date: Sun May 30 20:26:42 UTC 2021
Modified Files: src/usr.bin/make/unit-tests: varmod-unique.mk Log Message: tests/make: test whitespace normalization for modifier ':u' To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-unique.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-unique.mk diff -u src/usr.bin/make/unit-tests/varmod-unique.mk:1.4 src/usr.bin/make/unit-tests/varmod-unique.mk:1.5 --- src/usr.bin/make/unit-tests/varmod-unique.mk:1.4 Mon Aug 31 17:41:38 2020 +++ src/usr.bin/make/unit-tests/varmod-unique.mk Sun May 30 20:26:41 2021 @@ -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