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 make(1): add test for ${VAR::::}
details: https://anonhg.NetBSD.org/src/rev/1311b3ca948f
branches: trunk
changeset: 936674:1311b3ca948f
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Aug 01 15:16:15 2020 +0000
description:
make(1): add test for ${VAR::::}
It's a bit unrealistic, but at least there are good diagnostics.
diffstat:
usr.bin/make/unit-tests/varmod-edge.exp | 3 +++
usr.bin/make/unit-tests/varmod-edge.mk | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r e5efa6f26ffc -r 1311b3ca948f usr.bin/make/unit-tests/varmod-edge.exp
--- a/usr.bin/make/unit-tests/varmod-edge.exp Sat Aug 01 15:13:45 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-edge.exp Sat Aug 01 15:16:15 2020 +0000
@@ -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-bs
ok eq-esc
ok colon
+ok colons
exit status 0
diff -r e5efa6f26ffc -r 1311b3ca948f usr.bin/make/unit-tests/varmod-edge.mk
--- a/usr.bin/make/unit-tests/varmod-edge.mk Sat Aug 01 15:13:45 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-edge.mk Sat Aug 01 15:16:15 2020 +0000
@@ -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 @@
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}}
Home |
Main Index |
Thread Index |
Old Index