&Tmp-IP-Address-0 = 192.0.2.2
}
-if ("%{control[#]}" != 2) {
+if !(%{control.[#]} == 2) {
test_fail
}
-if ("%{control[0]}" != 192.0.2.1) {
+if !(%{control.[0]} == 192.0.2.1) {
test_fail
}
-if ("%{control[1]}" != 192.0.2.2) {
+if !(%{control.[1]} == 192.0.2.2) {
test_fail
}
-if (("%{control[n]}" != 192.0.2.2)) {
+if !(%{control.[n]} == 192.0.2.2) {
test_fail
}
-if ("%{control[*]}" != '192.0.2.1192.0.2.2') {
+#
+# Cast this to a string!
+#
+if !("%{control.[*]}" == '192.0.2.1192.0.2.2') {
test_fail
}
# Try calling these xlats in mapping too, they may get optimised to VPTs which is a
# different code path.
&request += {
- &Tmp-IP-Address-1 = "%{control[1]}"
- &Tmp-IP-Address-1 = "%{control[0]}"
- &Tmp-String-0 = "%(concat:%{control[*]} ,)"
- &Tmp-Integer-0 = "%{control[#]}"
+ &Tmp-IP-Address-1 = %{control.[1]}
+ &Tmp-IP-Address-1 = %{control.[0]}
+ &Tmp-String-0 = %(concat:%{control.[*]} ,)
+ &Tmp-Integer-0 = %{control.[#]}
}
-if (&Tmp-String-0 != '192.0.2.1,192.0.2.2') {
+if !(&Tmp-String-0 == '192.0.2.1,192.0.2.2') {
test_fail
}
-if (&Tmp-Integer-0 != 2) {
+if !(&Tmp-Integer-0 == 2) {
test_fail
}