]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use list.[*] instead of list[*]
authorAlan T. DeKok <aland@freeradius.org>
Tue, 22 Nov 2022 13:47:43 +0000 (08:47 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 22 Nov 2022 13:47:43 +0000 (08:47 -0500)
src/tests/keywords/concat
src/tests/keywords/join
src/tests/keywords/list-existence
src/tests/keywords/pairs
src/tests/keywords/policy.conf

index c71ca4da6885de281993fa9792337925b1af6b8d..ca8b6997a77625fe213053db95d0e573290ee408 100644 (file)
 
 ok     # separate updates
 
-#
-#  We need "ungroup" here, because request[*] is "all attributes with
-#  da of request", not "all attributes contained by the request VP."
-#
-#  We don't (yet) have syntax like "request.[*]", so we need this hack.
-#
 &request += {
-       &Tmp-String-1 = "%(concat:%(ungroup:%{request[*]}) ', ')"
+       &Tmp-String-1 = "%(concat:%{request.[*]} ', ')"
 }
 
 if (&Tmp-String-1 != "bob, hello, ab c, de fg, 123") {
index 2098b7b7f28b97e0f3f3a8637f2faeeb8e3768ab..fd39b750e2abb97260ad8c60bbb2887f14ed6360 100644 (file)
@@ -23,7 +23,7 @@
 #
 #  @todo - fix this...
 #
-&control.Tmp-String-1 := "%(concat:%(join:%(ungroup:%{request[*]}) %{control.Tmp-IP-Address-0}) '. ')"
+&control.Tmp-String-1 := "%(concat:%(join:%{request.[*]} %{control.Tmp-IP-Address-0}) '. ')"
 
 if (&control.Tmp-String-1 != "bob. hello. ab c. de fg. 123. 192.168.1.254") {
        test_fail
index f4bf6d2a3eb5dd91f3d47914067b40d07a01a1f0..067b5016e855e827bb77e61c9a8a162a99b6f32d 100644 (file)
@@ -5,7 +5,7 @@ if (&session-state.) {
        test_fail
 }
 
-if (&session-state[*]) {
+if (&session-state.[*]) {
        test_fail
 }
 
@@ -19,7 +19,11 @@ if (!&session-state.) {
        test_fail
 }
 
-if (!&session-state[*]) {
+if (!&session-state.[*]) {
+       test_fail
+}
+
+if !(%{session-state.[#]} == 1) {
        test_fail
 }
 
index 89c35127abada35e95260d0fd15f4c2bbf68ca38..bd77d944f3d3ce2d54c884947c408c3e36ce7cee 100644 (file)
@@ -11,7 +11,7 @@
 }
 
 &request += {
-       &Tmp-String-1 = "%(concat:%(pairs:request[*]) ', ')"
+       &Tmp-String-1 = "%(concat:%(pairs:request.[*]) ', ')"
        &Tmp-String-2 = "%(pairs:Tmp-String-0)"
        &Tmp-String-3 = "%(concat:%(pairs:Tmp-String-0[*]) ', ')"
        &Tmp-String-4 = "%(concat:%(pairs:control.) ', ')"
index 38fda3baa35afca14a0f309cc587eaf70a1686ec..e595d5bf33ae6058abca484dae9974c080d53227 100644 (file)
@@ -6,7 +6,7 @@
 #  Outputs the contents of the control list in debugging (-X) mode
 #
 debug_control {
-       if("%(debug_attr:control[*])" == '') {
+       if("%(debug_attr:control.[*])" == '') {
                noop
        }
 }
@@ -15,7 +15,7 @@ debug_control {
 #  Outputs the contents of the request list in debugging (-X) mode
 #
 debug_request {
-       if("%(debug_attr:request[*])" == '') {
+       if("%(debug_attr:request.[*])" == '') {
                noop
        }
 }
@@ -24,7 +24,7 @@ debug_request {
 #  Outputs the contents of the reply list in debugging (-X) mode
 #
 debug_reply {
-       if("%(debug_attr:reply[*])" == '') {
+       if("%(debug_attr:reply.[*])" == '') {
                noop
        }
 }