aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/directive-for-escape.exp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/directive-for-escape.exp')
-rw-r--r--contrib/bmake/unit-tests/directive-for-escape.exp219
1 files changed, 118 insertions, 101 deletions
diff --git a/contrib/bmake/unit-tests/directive-for-escape.exp b/contrib/bmake/unit-tests/directive-for-escape.exp
index d679e0756e33..78cc57a738a2 100644
--- a/contrib/bmake/unit-tests/directive-for-escape.exp
+++ b/contrib/bmake/unit-tests/directive-for-escape.exp
@@ -1,153 +1,170 @@
For: end for 1
-For: loop body:
+For: loop body with chars = !"#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~:
. info ${:U!"#$%&'()*+,-./0-9\:;<=>?@A-Z[\\]_^a-z{|\}~}
-make: Unclosed variable expression, expecting '}' for modifier "U!"" of variable "" with value "!""
-make: "directive-for-escape.mk" line 19: !"
+make: directive-for-escape.mk:21: Unclosed expression, expecting "}" for modifier "U!""
+ while evaluating "${:U!"" with value "!""
+ in .for loop from directive-for-escape.mk:20 with chars = !"#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~
+make: directive-for-escape.mk:21: !"
For: end for 1
-For: loop body:
+For: loop body with chars = !"\\#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~:
. info ${:U!"\\\\#$%&'()*+,-./0-9\:;<=>?@A-Z[\\]_^a-z{|\}~}
-make: Unclosed variable expression, expecting '}' for modifier "U!"\\\\" of variable "" with value "!"\\"
-make: "directive-for-escape.mk" line 29: !"\\
+make: directive-for-escape.mk:33: Unclosed expression, expecting "}" for modifier "U!"\\\\"
+ while evaluating "${:U!"\\\\" with value "!"\\"
+ in .for loop from directive-for-escape.mk:32 with chars = !"\\#$%&'()*+,-./0-9:;<=>?@A-Z[\]_^a-z{|}~
+make: directive-for-escape.mk:33: !"\\
For: end for 1
-For: loop body:
+For: loop body with i = $:
. info ${:U\$}
-make: "directive-for-escape.mk" line 43: $
-For: loop body:
+make: directive-for-escape.mk:57: $
+For: loop body with i = ${V}:
. info ${:U${V}}
-make: "directive-for-escape.mk" line 43: value
-For: loop body:
+make: directive-for-escape.mk:57: value
+For: loop body with i = ${V:=-with-modifier}:
. info ${:U${V:=-with-modifier}}
-make: "directive-for-escape.mk" line 43: value-with-modifier
-For: loop body:
+make: directive-for-escape.mk:57: value-with-modifier
+For: loop body with i = $(V):
. info ${:U$(V)}
-make: "directive-for-escape.mk" line 43: value
-For: loop body:
+make: directive-for-escape.mk:57: value
+For: loop body with i = $(V:=-with-modifier):
. info ${:U$(V:=-with-modifier)}
-make: "directive-for-escape.mk" line 43: value-with-modifier
+make: directive-for-escape.mk:57: value-with-modifier
For: end for 1
-For: loop body:
+For: loop body with i = $:
+. info ${:U\$}
+make: directive-for-escape.mk:69: $
+For: loop body with i = ${V}:
+. info ${:U${V}}
+make: directive-for-escape.mk:69: value
+For: loop body with i = ${V:=-with-modifier}:
+. info ${:U${V:=-with-modifier}}
+make: directive-for-escape.mk:69: value-with-modifier
+For: loop body with i = $(V):
+. info ${:U$(V)}
+make: directive-for-escape.mk:69: value
+For: loop body with i = $(V:=-with-modifier):
+. info ${:U$(V:=-with-modifier)}
+make: directive-for-escape.mk:69: value-with-modifier
+For: end for 1
+For: loop body with i = ${UNDEF:U\$\$:
# ${:U\${UNDEF\:U\\$\\$}
-For: loop body:
+For: loop body with i = {{}}:
# ${:U{{\}\}}
-For: loop body:
+For: loop body with i = end}:
# ${:Uend\}}
For: end for 1
-For: loop body:
+For: loop body with i = ${UNDEF:U\$\$:
. info ${:U\${UNDEF\:U\\$\\$}
-make: "directive-for-escape.mk" line 92: ${UNDEF:U\backslash$
-For: loop body:
+make: directive-for-escape.mk:120: ${UNDEF:U\backslash$
+For: loop body with i = {{}}:
. info ${:U{{\}\}}
-make: "directive-for-escape.mk" line 92: {{}}
-For: loop body:
+make: directive-for-escape.mk:120: {{}}
+For: loop body with i = end}:
. info ${:Uend\}}
-make: "directive-for-escape.mk" line 92: end}
+make: directive-for-escape.mk:120: end}
For: end for 1
-For: loop body:
+For: loop body with i = begin<${UNDEF:Ufallback:N{{{}}}}>end:
. info ${:Ubegin<${UNDEF:Ufallback:N{{{}}}}>end}
-make: "directive-for-escape.mk" line 113: begin<fallback>end
+make: directive-for-escape.mk:138: begin<fallback>end
For: end for 1
-For: loop body:
+For: loop body with i = $:
. info ${:U\$}
-make: "directive-for-escape.mk" line 121: $
-For: end for 1
-For: loop body:
-. info ${NUMBERS} ${:Ureplaced}
-make: "directive-for-escape.mk" line 129: one two three replaced
-For: end for 1
-For: loop body:
-. info ${:Ureplaced}
-make: "directive-for-escape.mk" line 139: replaced
-For: end for 1
-For: loop body:
-. info . $$i: ${:Uinner}
-. info . $${i}: ${:Uinner}
-. info . $${i:M*}: ${:Uinner:M*}
-. info . $$(i): $(:Uinner)
-. info . $$(i:M*): $(:Uinner:M*)
-. info . $${i$${:U}}: ${i${:U}}
-. info . $${i\}}: ${:Uinner\}} # XXX: unclear why ForLoop_SubstVarLong needs this
-. info . $${i2}: ${i2}
-. info . $${i,}: ${i,}
-. info . adjacent: ${:Uinner}${:Uinner}${:Uinner:M*}${:Uinner}
-make: "directive-for-escape.mk" line 147: . $i: inner
-make: "directive-for-escape.mk" line 148: . ${i}: inner
-make: "directive-for-escape.mk" line 149: . ${i:M*}: inner
-make: "directive-for-escape.mk" line 150: . $(i): inner
-make: "directive-for-escape.mk" line 151: . $(i:M*): inner
-make: "directive-for-escape.mk" line 152: . ${i${:U}}: outer
-make: "directive-for-escape.mk" line 153: . ${i\}}: inner}
-make: "directive-for-escape.mk" line 154: . ${i2}: two
-make: "directive-for-escape.mk" line 155: . ${i,}: comma
-make: "directive-for-escape.mk" line 156: . adjacent: innerinnerinnerinner
-For: end for 1
-For: loop body:
-. info eight $$$$$$$$ and no cents.
-. info eight ${:Udollar}${:Udollar}${:Udollar}${:Udollar} and no cents.
-make: "directive-for-escape.mk" line 164: eight $$$$ and no cents.
-make: "directive-for-escape.mk" line 165: eight dollardollardollardollar and no cents.
-make: "directive-for-escape.mk" line 174: eight and no cents.
-For: end for 1
-make: "directive-for-escape.mk" line 181: newline in .for value
-make: "directive-for-escape.mk" line 181: newline in .for value
-For: loop body:
-. info short: ${:U" "}
-. info long: ${:U" "}
-make: "directive-for-escape.mk" line 182: short: " "
-make: "directive-for-escape.mk" line 183: long: " "
-For: end for 1
-For: loop body:
-For: end for 1
-Parse_PushInput: .for loop in directive-for-escape.mk, line 196
-make: "directive-for-escape.mk" line 196: newline in .for value
- in .for loop from directive-for-escape.mk:196 with i = "
+make: directive-for-escape.mk:147: $
+make: directive-for-escape.mk:155: Invalid character ":" in .for loop variable name
+For: end for 1
+make: directive-for-escape.mk:165: Invalid character "}" in .for loop variable name
+For: end for 1
+For: end for 1
+For: loop body with i = inner:
+. info ${:Uinner} ${:Uinner} ${:Uinner:M*} $(:Uinner) $(:Uinner:M*)
+make: directive-for-escape.mk:175: inner inner inner inner inner
+For: end for 1
+For: loop body with i = inner:
+. info ${i${:U}}
+make: directive-for-escape.mk:179: outer
+For: end for 1
+For: loop body with i = inner:
+. info ${:Uinner\}} # XXX: unclear why ForLoop_SubstVarLong needs this
+make: directive-for-escape.mk:183: inner}
+For: end for 1
+For: loop body with i = inner:
+. info ${i2} ${i,} ${:Uinner}${:Uinner}${:Uinner:M*}${:Uinner}
+make: directive-for-escape.mk:187: two comma innerinnerinnerinner
+make: directive-for-escape.mk:196: Invalid character "$" in .for loop variable name
+For: end for 1
+make: directive-for-escape.mk:208: eight and no cents.
+For: end for 1
+make: directive-for-escape.mk:222: newline in .for value
+ in .for loop from directive-for-escape.mk:222 with i = "
+"
+make: directive-for-escape.mk:222: newline in .for value
+ in .for loop from directive-for-escape.mk:222 with i = "
"
-For: loop body:
+For: loop body with i = "
+":
+. info short: ${:U" "}, long: ${:U" "}
+make: directive-for-escape.mk:223: short: " ", long: " "
+For: end for 1
+For: loop body with i = "
+":
+Parsing directive-for-escape.mk:236: .for i in "${.newline}"
+For: end for 1
+Parse_PushInput: .for loop in directive-for-escape.mk:236
+make: directive-for-escape.mk:236: newline in .for value
+ in .for loop from directive-for-escape.mk:236 with i = "
+"
+For: loop body with i = "
+":
: ${:U" "}
SetFilenameVars: ${.PARSEDIR} = <some-dir> ${.PARSEFILE} = `directive-for-escape.mk'
-Parsing line 197: : ${:U" "}
+Parsing directive-for-escape.mk:237: : ${:U" "}
ParseDependency(: " ")
-ParseEOF: returning to file directive-for-escape.mk, line 199
+ParseEOF: returning to directive-for-escape.mk:239
SetFilenameVars: ${.PARSEDIR} = <some-dir> ${.PARSEFILE} = `directive-for-escape.mk'
-Parsing line 199: .MAKEFLAGS: -d0
+Parsing directive-for-escape.mk:239: .MAKEFLAGS: -d0
ParseDependency(.MAKEFLAGS: -d0)
For: end for 1
-For: loop body:
+For: loop body with i = #:
# ${:U#}
-For: loop body:
+For: loop body with i = \\#:
# ${:U\\\\#}
For: end for 1
-For: loop body:
+For: loop body with i = $:
# ${:U\$}
-For: loop body:
+For: loop body with i = $i:
# ${:U$i}
-For: loop body:
+For: loop body with i = $(i):
# ${:U$(i)}
-For: loop body:
+For: loop body with i = ${i}:
# ${:U${i}}
-For: loop body:
+For: loop body with i = $$:
# ${:U$$}
-For: loop body:
+For: loop body with i = $$$$:
# ${:U$$$$}
-For: loop body:
+For: loop body with i = ${:U\$\$}:
# ${:U${:U\$\$}}
For: end for 1
-For: loop body:
+For: loop body with i = ${.TARGET}:
# ${:U${.TARGET}}
-For: loop body:
+For: loop body with i = ${.TARGET}:
# ${:U${.TARGET}}
-For: loop body:
+For: loop body with i = $${.TARGET}:
# ${:U$${.TARGET\}}
-For: loop body:
+For: loop body with i = $${.TARGET}:
# ${:U$${.TARGET\}}
For: end for 1
-For: loop body:
+For: loop body with i = (((:
# ${:U(((}
-For: loop body:
+For: loop body with i = {{{:
# ${:U{{{}
-For: loop body:
+For: loop body with i = ))):
# ${:U)))}
-For: loop body:
+For: loop body with i = }}}:
# ${:U\}\}\}}
+For: end for 1
+For: loop body with , = 1:
+# $$i $i
+# VAR= $$i $i ${a:S,from${:U1}to,}
+VAR= $$i $i ${a:S,from${:U1}to,}
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1