summaryrefslogtreecommitdiff
path: root/usr.bin/make/unit-tests/varparse-errors.mk
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-12-01 20:15:23 +0000
committerrillig <rillig@NetBSD.org>2020-12-01 20:15:23 +0000
commit09c1141789b96b3323a83ddd4ace1846bb4d5f8a (patch)
tree8d22dc5d990f3680cafa953a021f7ab6076f2b65 /usr.bin/make/unit-tests/varparse-errors.mk
parent56870414824eebdbc2bcea90c3602d9c3811dc30 (diff)
make(1): add test for parse errors in variable name in Var_SetWithFlags
Diffstat (limited to 'usr.bin/make/unit-tests/varparse-errors.mk')
-rw-r--r--usr.bin/make/unit-tests/varparse-errors.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/make/unit-tests/varparse-errors.mk b/usr.bin/make/unit-tests/varparse-errors.mk
index 42f5b65a728..164d9ac7503 100644
--- a/usr.bin/make/unit-tests/varparse-errors.mk
+++ b/usr.bin/make/unit-tests/varparse-errors.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varparse-errors.mk,v 1.1 2020/11/08 16:44:47 rillig Exp $
+# $NetBSD: varparse-errors.mk,v 1.2 2020/12/01 20:15:23 rillig Exp $
# Tests for parsing and evaluating all kinds of variable expressions.
#
@@ -32,4 +32,16 @@ ERR_EVAL= An evaluation error ${:Uvalue:C,.,\3,}.
. error
.endif
+# As of 2020-12-01, errors in the variable name are silently ignored.
+VAR.${:U:Z}= unknown modifier in the variable name
+.if ${VAR.} != "unknown modifier in the variable name"
+. error
+.endif
+
+# As of 2020-12-01, errors in the variable name are silently ignored.
+VAR.${:U:Z}post= unknown modifier with text in the variable name
+.if ${VAR.post} != "unknown modifier with text in the variable name"
+. error
+.endif
+
all: