Module Name: src
Committed By: rillig
Date: Sat Aug 1 15:16:15 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: varmod-edge.exp varmod-edge.mk
Log Message:
make(1): add test for ${VAR::::}
It's a bit unrealistic, but at least there are good diagnostics.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/varmod-edge.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-edge.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-edge.exp
diff -u src/usr.bin/make/unit-tests/varmod-edge.exp:1.5 src/usr.bin/make/unit-tests/varmod-edge.exp:1.6
--- src/usr.bin/make/unit-tests/varmod-edge.exp:1.5 Sat Aug 1 15:13:45 2020
+++ src/usr.bin/make/unit-tests/varmod-edge.exp Sat Aug 1 15:16:15 2020
@@ -1,5 +1,7 @@
make: Unclosed variable specification (expecting '}') for "" (value "*)") modifier U
make: Unclosed substitution for INP.eq-esc (= missing)
+make: Unknown modifier ':'
+make: Unknown modifier ':'
ok M-paren
ok M-mixed
ok M-unescape
@@ -15,4 +17,5 @@ ok eq-q
ok eq-bs
ok eq-esc
ok colon
+ok colons
exit status 0
Index: src/usr.bin/make/unit-tests/varmod-edge.mk
diff -u src/usr.bin/make/unit-tests/varmod-edge.mk:1.9 src/usr.bin/make/unit-tests/varmod-edge.mk:1.10
--- src/usr.bin/make/unit-tests/varmod-edge.mk:1.9 Sat Aug 1 15:13:45 2020
+++ src/usr.bin/make/unit-tests/varmod-edge.mk Sat Aug 1 15:16:15 2020
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-edge.mk,v 1.9 2020/08/01 15:13:45 rillig Exp $
+# $NetBSD: varmod-edge.mk,v 1.10 2020/08/01 15:16:15 rillig Exp $
#
# Tests for edge cases in variable modifiers.
#
@@ -156,6 +156,11 @@ INP.colon= value
MOD.colon= ${INP.colon:}
EXP.colon= value
+TESTS+= colons
+INP.colons= value
+MOD.colons= ${INP.colons::::}
+EXP.colons= # empty
+
all:
.for test in ${TESTS}
. if ${MOD.${test}} == ${EXP.${test}}