#
# We only care if this crashes or not.
#
-&Filter-Id := "%{eval:1 + 1} %{tolower: 1}"
+&Filter-Id := "%{1 + 1} %tolower(1)"
success
ok # break up edit sections
&Tmp-String-1 := {
- "%{hex:%{Tmp-String-0}}"
- "%{hex:%{Tmp-Octets-0}}"
- "%{hex:%{Tmp-IP-Address-0}}"
- "%{hex:%{Tmp-Integer-0}}"
- "%{hex:%{Tmp-Cast-Ifid}}"
- "%{hex:%{Tmp-Cast-IPv6Addr}}"
- "%{hex:%{Tmp-Cast-IPv6Prefix}}"
- "%{hex:%{Tmp-Cast-Byte}}"
+ %hex(%{Tmp-String-0})
+ %hex(%{Tmp-Octets-0})
+ %hex(%{Tmp-IP-Address-0})
+ %hex(%{Tmp-Integer-0})
+ %hex(%{Tmp-Cast-Ifid})
+ %hex(%{Tmp-Cast-IPv6Addr})
+ %hex(%{Tmp-Cast-IPv6Prefix})
+ %hex(%{Tmp-Cast-Byte})
}
# String
}
&Tmp-String-1 := {
- "%{hex:%{Tmp-Cast-Short}}"
- "%{hex:%{Tmp-Cast-Ether}}"
- "%{hex:%{Tmp-Cast-Integer64}}"
- "%{hex:%{Tmp-Cast-IPv4Prefix}}"
+ %hex(%{Tmp-Cast-Short})
+ %hex(%{Tmp-Cast-Ether})
+ %hex(%{Tmp-Cast-Integer64})
+ %hex(%{Tmp-Cast-IPv4Prefix})
}
# short
# PRE: if
#
&Tmp-String-0 := "AbCdE"
-&Tmp-String-0 := "%{tolower:%{Tmp-String-0}}"
-&Tmp-String-1 := "%{tolower:AAbbCCdd}"
+&Tmp-String-0 := %tolower(%{Tmp-String-0})
+&Tmp-String-1 := %tolower(AAbbCCdd)
#
# Doesn't exist
#
-&Tmp-String-2 := "%{tolower:%{Tmp-String-9}}"
+&Tmp-String-2 := "%tolower(%{Tmp-String-9})"
if (!(&Tmp-String-0 == "abcde")) {
#
&Tmp-String-0 := "AbCdE"
-&Tmp-String-0 := "%{toupper:%{Tmp-String-0}}"
-&Tmp-String-1 := "%{toupper:AAbbCCdd}"
-&Tmp-String-2 := "%{toupper:%{Tmp-String-9}}"
+&Tmp-String-0 := %toupper(%{Tmp-String-0})
+&Tmp-String-1 := %toupper(AAbbCCdd)
+&Tmp-String-2 := "%toupper(%{Tmp-String-9})"
if (!(&Tmp-String-0 == "ABCDE")) {
test_fail
#
-# PRE: update
+# PRE: if
#
#
# Verify escaping of %
test_fail
}
-if !("%{tolower:\%{ FOO}" == '%{ foo') {
+if !(%tolower(\%{FOO}) == '%{foo}') {
test_fail
}
}
&request += {
- &Tmp-String-0 = "%{string:%{Tmp-Octets-0}}"
- &Tmp-String-1 = "%{string:%{Tmp-Octets-1}}"
- &Tmp-String-2 = "%{string:%{Tmp-Octets-2}}"
- &Tmp-String-3 = "%{string:%{Tmp-Octets-3}}"
+ &Tmp-String-0 = %string(%{Tmp-Octets-0})
+ &Tmp-String-1 = %string(%{Tmp-Octets-1})
+ &Tmp-String-2 = %string(%{Tmp-Octets-2})
+ &Tmp-String-3 = %string(%{Tmp-Octets-3})
}
if (!(&Tmp-String-0 == "\\\\")) {
#
# Test interpolation between string expansions and strings
#
-if (!("%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}" == "test1test2")) {
+if (!("%string(%{Tmp-Octets-4})%string(%{Tmp-Octets-5})" == "test1test2")) {
test_fail
}
-if (!("test0%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}" == "test0test1test2")) {
+#
+# We don't need %string(...) either.
+#
+if !("%{(string) &Tmp-Octets-4}%{(string) &Tmp-Octets-5}" == "test1test2") {
+ test_fail
+}
+
+if (!("test0%string(%{Tmp-Octets-4})%string(%{Tmp-Octets-5})" == "test0test1test2")) {
test_fail
}
-if (!("%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}test3" == "test1test2test3")) {
+if (!("%string(%{Tmp-Octets-4})%string(%{Tmp-Octets-5})test3" == "test1test2test3")) {
test_fail
}