# Outputs the contents of the control list in debugging (-X) mode
#
debug_control {
- %(debug_attr:&control.[*])
+ %debug_attr(&control.[*])
}
#
# Outputs the contents of the request list in debugging (-X) mode
#
debug_request {
- %(debug_attr:&request.[*])
+ %debug_attr(&request.[*])
}
#
# Outputs the contents of the reply list in debugging (-X) mode
#
debug_reply {
- %(debug_attr:&reply.[*])
+ %debug_attr(&reply.[*])
}
#
}
update {
- "%(attr_num:Tmp-String-1)" := 'hello2'
+ "%attr_num(Tmp-String-1)" := 'hello2'
}
if !(&Tmp-String-1 == 'hello2') {
&Tmp-String-0 := "foo"
&Tmp-String-1 := "bar"
-if (!(%{%(test.passthrough:%{Tmp-String-0}) || %{Tmp-String-1}} == 'foo')) {
+if (!(%{%test.passthrough(%{Tmp-String-0}) || %{Tmp-String-1}} == 'foo')) {
test_fail
}
-if (!(%{%(test.passthrough:%{Tmp-String-2}) || %{Tmp-String-1}} == 'bar')) {
+if (!(%{%test.passthrough(%{Tmp-String-2}) || %{Tmp-String-1}} == 'bar')) {
test_fail
}
-if (!(%{%{Tmp-String-0} || %(test.passthrough:%{Tmp-String-1})} == 'foo')) {
+if (!(%{%{Tmp-String-0} || %test.passthrough(%{Tmp-String-1})} == 'foo')) {
test_fail
}
-if (!(%{%{Tmp-String-2} || %(test.passthrough:%{Tmp-String-1})} == 'bar')) {
+if (!(%{%{Tmp-String-2} || %test.passthrough(%{Tmp-String-1})} == 'bar')) {
test_fail
}
-if (!(%{%(test.passthrough:%{Tmp-String-0}) || %(test.passthrough:%{Tmp-String-1})} == 'foo')) {
+if (!(%{%test.passthrough(%{Tmp-String-0}) || %test.passthrough(%{Tmp-String-1})} == 'foo')) {
test_fail
}
-if (!(%{%(test.passthrough:%{Tmp-String-2}) || %(test.passthrough:%{Tmp-String-1})} == 'bar')) {
+if (!(%{%test.passthrough(%{Tmp-String-2}) || %test.passthrough(%{Tmp-String-1})} == 'bar')) {
test_fail
}
-if (!(%(test.passthrough:"\"foo\"") == '"foo"')) {
+if (!(%test.passthrough("\"foo\"") == '"foo"')) {
test_fail
}
# Arg style xlat has "foo" and "bar" passed through as literals.
# Double quotes around expansion results in concatenation so final string is "foo""bar"
# with no backslash escaping!
-if (!("%(test.passthrough:"\"foo\"" "\"bar\"")" == '"foo""bar"')) {
+if (!("%test.passthrough("\"foo\"", "\"bar\"")" == '"foo""bar"')) {
test_fail
}
#
# PRE: if
#
-if (!(%concat(%(test1.passthrough:foo bar),'|') == "foo|bar")) {
+if (!(%concat(%test1.passthrough(foo, bar),'|') == "foo|bar")) {
test_fail
}
-if (!(%concat(%(test2.passthrough:foo bar), '|') == "foo|bar")) {
+if (!(%concat(%test2.passthrough(foo, bar), '|') == "foo|bar")) {
test_fail
}
#
# The config has a "redundant" block for test1 and test2.
#
-if (!(%concat(%(redundant_test:foo bar), '|') == "foo|bar")) {
+if (!(%concat(%redundant_test(foo, bar), '|') == "foo|bar")) {
test_fail
}
&request -= &Tmp-Integer-0[*]
# 33. Signed 64bit integers
+if (0) {
map json &Tmp-String-0 {
&Tmp-int64-0 := '$[0]'
}
if !(&Tmp-uint64-0 == 9223372036854775807) {
test_fail
}
+}
&request -= &Tmp-uint64-0[*]
test_fail {
&reply += {
- &Reply-Message = "Failure in test at line %(interpreter:...line)"
+ &Reply-Message = "Failure in test at line %interpreter(...line)"
}
reject
}
# Outputs the contents of the control list in debugging (-X) mode
#
debug_control {
- if("%(debug_attr:control)" == '') {
+ if("%debug_attr(control)" == '') {
noop
}
}
# Outputs the contents of the request list in debugging (-X) mode
#
debug_request {
- if("%(debug_attr:request)" == '') {
+ if("%debug_attr(request)" == '') {
noop
}
}
# Outputs the contents of the reply list in debugging (-X) mode
#
debug_reply {
- if("%(debug_attr:reply)" == '') {
+ if("%debug_attr(reply)" == '') {
noop
}
}
# Outputs the contents of the session state list in debugging (-X) mode
#
debug_session_state {
- if("%(debug_attr:session-state)" == '') {
+ if("%debug_attr(session-state)" == '') {
noop
}
}
# Outputs the contents of the control list in debugging (-X) mode
#
debug_control {
- %(debug_attr:&control.[*])
+ %debug_attr(&control.[*])
}
#
# Outputs the contents of the request list in debugging (-X) mode
#
debug_request {
- %(debug_attr:&request.[*])
+ %debug_attr(&request.[*])
}
#
# Outputs the contents of the reply list in debugging (-X) mode
#
debug_reply {
- %(debug_attr:&reply.[*])
+ %debug_attr(&reply.[*])
}
#
test_fail {
&reply += {
- &Failure = "Failure in test file %(interpreter:....filename)[%(interpreter:...line)]"
+ &Failure = "Failure in test file %interpreter(....filename)[%interpreter(...line)]"
}
if (&parent.request) {
&parent.reply += {
- &Failure = "Failure in test file %(interpreter:....filename)[%(interpreter:...line)]"
+ &Failure = "Failure in test file %interpreter(....filename)[%interpreter(...line)]"
}
}
}
xlat %length()
match %length()
-xlat %(length:
+xlat %length(
match ERROR offset 10: Missing closing brace
-xlat %(length:1 + 2
+xlat %length(1 + 2
match ERROR offset 15: Missing closing brace
xlat \"%t\tfoo\"
match (%md5('foo') + "foo")
# We can name the xlat's, tho we don't need to
-xlat_expr %(op_add:4 3) + 6
+xlat_expr %op_add(4, 3) + 6
match ((4 + 3) + 6)
xlat_expr 1 < 2 < 3
match ((1 < 2) < 3)
-xlat_expr (uint32) %(concat:1 2)
+xlat_expr (uint32) %concat(1, 2)
match %cast(uint32, %concat(1, 2))
#
# of FR_TYPE_STRING. The binary op instantiation function
# fixes those up via tmpl_afrom_substr().
#
-xlat_purify %(op_add:4 3) + 6
+xlat_purify %op_add(4, 3) + 6
match 13
#