summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2020-08-30 12:17:19 +0000
committertb <tb@openbsd.org>2020-08-30 12:17:19 +0000
commit0c786f43bb54ec25eeecc466b3cf7d1e92cf870b (patch)
treec01669064fb25c6b9b018be1a895dea374f02ea5
parentFix :S with anchors and replacement (diff)
downloadwireguard-openbsd-0c786f43bb54ec25eeecc466b3cf7d1e92cf870b.tar.xz
wireguard-openbsd-0c786f43bb54ec25eeecc466b3cf7d1e92cf870b.zip
Add regress test case for make/varmodifiers.c r1.48
(Fix :S with anchors and replacement)
-rw-r--r--regress/usr.bin/make/mk2116
-rw-r--r--regress/usr.bin/make/t21.out5
2 files changed, 20 insertions, 1 deletions
diff --git a/regress/usr.bin/make/mk21 b/regress/usr.bin/make/mk21
index 0827fb42ec3..c0db874edba 100644
--- a/regress/usr.bin/make/mk21
+++ b/regress/usr.bin/make/mk21
@@ -1,4 +1,4 @@
-# $OpenBSD: mk21,v 1.2 2017/07/07 16:31:37 bluhm Exp $
+# $OpenBSD: mk21,v 1.3 2020/08/30 12:17:19 tb Exp $
TRUC= http://heanet.dl.sourceforge.net/sourceforge/%SUBDIR%/
.for _S in ${TRUC}
@@ -12,7 +12,21 @@ X?= ${TRUC:C@([^:/])/.+$@\1/@}
Y?= ${TRUC:S/^${X}//:S/^://}
Z?= ${TRUC:S/^${TRUC:C@([^:/])/.+$@\1/@}//:S/^://}
+A?= machin truc
+B?= ${A:S/^/mot: &/}
+C?= ${A:S/$/&: mot/}
+
+D?= foo bar barr
+E?= ${D:S/^b/s&/}
+F?= ${D:S/r$/&/}
+G?= ${D:S/^bar$/&&ian/}
+
all:
+ @echo "B= $B"
+ @echo "C= $C"
+ @echo "E= $E"
+ @echo "F= $F"
+ @echo "G= $G"
@echo "S= $S"
@echo "T= $T"
@echo "X= $X"
diff --git a/regress/usr.bin/make/t21.out b/regress/usr.bin/make/t21.out
index 6043d56929c..d4303ad3fc8 100644
--- a/regress/usr.bin/make/t21.out
+++ b/regress/usr.bin/make/t21.out
@@ -1,3 +1,8 @@
+B= mot: machin mot: truc
+C= machin: mot truc: mot
+E= foo sbar sbarr
+F= foo bar barr
+G= foo barbarian barr
S= sourceforge/%SUBDIR%/
T= sourceforge/%SUBDIR%/
X= http://heanet.dl.sourceforge.net/