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: show that in ':S', '.' a...



details:   https://anonhg.NetBSD.org/src/rev/8c27933810ca
branches:  trunk
changeset: 1021180:8c27933810ca
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri May 14 19:37:16 2021 +0000

description:
tests/make: show that in ':S', '.' and '*' are ordinary characters

diffstat:

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

diffs (24 lines):

diff -r 14bbbafac015 -r 8c27933810ca usr.bin/make/unit-tests/varmod-subst.mk
--- a/usr.bin/make/unit-tests/varmod-subst.mk   Fri May 14 13:36:28 2021 +0000
+++ b/usr.bin/make/unit-tests/varmod-subst.mk   Fri May 14 19:37:16 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-subst.mk,v 1.7 2020/11/15 20:20:58 rillig Exp $
+# $NetBSD: varmod-subst.mk,v 1.8 2021/05/14 19:37:16 rillig Exp $
 #
 # Tests for the :S,from,to, variable modifier.
 
@@ -78,6 +78,14 @@
 .  warning The :S modifier matches a too long suffix anchored at both ends.
 .endif
 
+.if ${WORDS:S,*,replacement,} != ${WORDS}
+.  error The '*' seems to be interpreted as a wildcard of some kind.
+.endif
+
+.if ${WORDS:S,.,replacement,} != ${WORDS}
+.  error The '.' seems to be interpreted as a wildcard of some kind.
+.endif
+
 mod-subst:
        @echo $@:
        @echo :${:Ua b b c:S,a b,,:Q}:



Home | Main Index | Thread Index | Old Index