#
# First choice
#
-&Tmp-String-2 := "%{%{Tmp-String-0}:-%{Tmp-String-1}}"
+&Tmp-String-2 := "%{&Tmp-String-0 || &Tmp-String-1}"
if (!(&Tmp-String-2 == 'foo')) {
test_fail
}
# Second choice
#
&request -= &Tmp-String-0[*]
-&Tmp-String-2 := "%{%{Tmp-String-0}:-%{Tmp-String-1}}"
+&Tmp-String-2 := "%{&Tmp-String-0 || &Tmp-String-1}"
if (!(&Tmp-String-2 == 'bar')) {
test_fail
}
#
# Alternation is empty
#
-&Tmp-String-2 := "%{%{Tmp-String-0}:-}"
+&Tmp-String-2 := "%{&Tmp-String-0 || ''}"
if (!(&Tmp-String-2 == '')) {
test_fail
}
#
# Both sides are failing, so the assignment returns a NULL string
#
-&Tmp-String-2 := "%{%{Tmp-String-0}:-%{Tmp-String-1}}"
+&Tmp-String-2 := "%{&Tmp-String-0 || &Tmp-String-1}"
if (!(&Tmp-String-2 == "")) {
test_fail
}
#
&request -= &Tmp-String-2[*]
-&Tmp-String-2 := %{%{Tmp-String-0}:-%{Tmp-String-1}}
+&Tmp-String-2 := %{&Tmp-String-0 || &Tmp-String-1}
if (&Tmp-String-2) {
test_fail
}
&request -= &Tmp-String-0[*]
&request -= &Tmp-String-1[*]
-&Tmp-String-2 := "%{%{Tmp-String-0[0]}:-%{Tmp-String-1[0]}}%(delay_10s:)"
+&Tmp-String-2 := "%{&Tmp-String-0[0] || &Tmp-String-1[0]}%(delay_10s:)"
success
# Regression test for double consecutive alternations
-&Tmp-uint64-0 := "%{%{Acct-Input-Octets}:-2}%{%{Acct-Input-Gigawords}:-1}"
+&Tmp-uint64-0 := "%{&Acct-Input-Octets || "2"}%{&Acct-Input-Gigawords || "1"}"
if (!(&Tmp-uint64-0 == 21)) {
test_fail
}
}
# Check for 'splosions
-"%{%{control.Password.Cleartext}:-%{control.User-Name}}"
-"%{%{control.User-Name}:-%{control.Password.Cleartext}}"
+"%{&control.Password.Cleartext || &control.User-Name}"
+"%{&control.User-Name || &control.Password.Cleartext}"
if (&control.Password.Cleartext =~ /(h)(e)(l)(l)(o)/) {
"%{0}"
# The default key attribute to use for matches. The content
# of this attribute is used to match the "name" of the
# entry.
- #key = "%{%{Stripped-User-Name}:-%{User-Name}}"
+ #key = "%{&Stripped-User-Name || &User-Name}"
# The old "users" style file is now located here.
filename = $ENV{MODULE_TEST_DIR}/authorize