summaryrefslogtreecommitdiff
path: root/unit-tests/varparse-errors.mk
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/varparse-errors.mk')
-rw-r--r--unit-tests/varparse-errors.mk26
1 files changed, 22 insertions, 4 deletions
diff --git a/unit-tests/varparse-errors.mk b/unit-tests/varparse-errors.mk
index f40e7206b0c3..d10160b816e5 100644
--- a/unit-tests/varparse-errors.mk
+++ b/unit-tests/varparse-errors.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varparse-errors.mk,v 1.13 2024/06/02 15:31:26 rillig Exp $
+# $NetBSD: varparse-errors.mk,v 1.17 2024/07/05 19:47:22 rillig Exp $
# Tests for parsing and evaluating all kinds of expressions.
#
@@ -34,7 +34,7 @@ ERR_EVAL= An evaluation error ${:Uvalue:C,.,\3,}.
# As of 2020-12-01, errors in the variable name are silently ignored.
# Since var.c 1.754 from 2020-12-20, unknown modifiers at parse time result
# in an error message and a non-zero exit status.
-# expect+1: while evaluating "${:U:Z}": Unknown modifier "Z"
+# expect+1: while evaluating "${:U:Z}" with value "": Unknown modifier "Z"
VAR.${:U:Z}= unknown modifier in the variable name
.if ${VAR.} != "unknown modifier in the variable name"
. error
@@ -43,7 +43,7 @@ VAR.${:U:Z}= unknown modifier in the variable name
# As of 2020-12-01, errors in the variable name are silently ignored.
# Since var.c 1.754 from 2020-12-20, unknown modifiers at parse time result
# in an error message and a non-zero exit status.
-# expect+1: while evaluating "${:U:Z}post": Unknown modifier "Z"
+# expect+1: while evaluating "${:U:Z}post" with value "": Unknown modifier "Z"
VAR.${:U:Z}post= unknown modifier with text in the variable name
.if ${VAR.post} != "unknown modifier with text in the variable name"
. error
@@ -66,8 +66,12 @@ VAR.${:U:Z}post= unknown modifier with text in the variable name
#
#.MAKEFLAGS: -dv
IND= ${:OX}
+# expect+6: while evaluating "${:U:OX:U${IND}} ${:U:OX:U${IND}}" with value "": Bad modifier ":OX"
+# expect+5: while evaluating "${:U:OX:U${IND}}" with value "": Bad modifier ":OX"
+# expect+4: Undefined variable "${:U:OX"
+# expect+3: while evaluating variable "IND" with value "${:OX}": while evaluating "${:OX}" with value "": Bad modifier ":OX"
# expect+2: Undefined variable "${:U:OX"
-# expect+1: Undefined variable "${:U:OX"
+# expect+1: while evaluating variable "IND" with value "${:OX}": while evaluating "${:OX}" with value "": Bad modifier ":OX"
_:= ${:U:OX:U${IND}} ${:U:OX:U${IND}}
#.MAKEFLAGS: -d0
@@ -75,17 +79,31 @@ _:= ${:U:OX:U${IND}} ${:U:OX:U${IND}}
# Before var.c 1.032 from 2022-08-24, make complained about 'Unknown modifier'
# or 'Bad modifier' when in fact the modifier was entirely correct, it was
# just not delimited by either ':' or '}' but instead by '\0'.
+# expect+1: while evaluating "${:U:Q" with value "": Unclosed expression, expecting '}' for modifier "Q"
UNCLOSED:= ${:U:Q
+# expect+1: while evaluating "${:U:sh" with value "": Unclosed expression, expecting '}' for modifier "sh"
UNCLOSED:= ${:U:sh
+# expect+1: while evaluating "${:U:tA" with value "": Unclosed expression, expecting '}' for modifier "tA"
UNCLOSED:= ${:U:tA
+# expect+1: while evaluating "${:U:tsX" with value "": Unclosed expression, expecting '}' for modifier "tsX"
UNCLOSED:= ${:U:tsX
+# expect+1: while evaluating "${:U:ts" with value "": Unclosed expression, expecting '}' for modifier "ts"
UNCLOSED:= ${:U:ts
+# expect+1: while evaluating "${:U:ts\040" with value "": Unclosed expression, expecting '}' for modifier "ts\040"
UNCLOSED:= ${:U:ts\040
+# expect+1: while evaluating "${:U:u" with value "": Unclosed expression, expecting '}' for modifier "u"
UNCLOSED:= ${:U:u
+# expect+1: while evaluating "${:U:H" with value ".": Unclosed expression, expecting '}' for modifier "H"
UNCLOSED:= ${:U:H
+# expect+1: while evaluating "${:U:[1]" with value "": Unclosed expression, expecting '}' for modifier "[1]"
UNCLOSED:= ${:U:[1]
+# expect+1: while evaluating "${:U:hash" with value "b2af338b": Unclosed expression, expecting '}' for modifier "hash"
UNCLOSED:= ${:U:hash
+# expect+1: while evaluating "${:U:range" with value "1": Unclosed expression, expecting '}' for modifier "range"
UNCLOSED:= ${:U:range
+# expect+1: while evaluating "${:U:_" with value "": Unclosed expression, expecting '}' for modifier "_"
UNCLOSED:= ${:U:_
+# expect+1: while evaluating "${:U:gmtime" with value "<timestamp>": Unclosed expression, expecting '}' for modifier "gmtime"
UNCLOSED:= ${:U:gmtime
+# expect+1: while evaluating "${:U:localtime" with value "<timestamp>": Unclosed expression, expecting '}' for modifier "localtime"
UNCLOSED:= ${:U:localtime