From: Alan T. DeKok Date: Tue, 22 Nov 2022 13:47:43 +0000 (-0500) Subject: use list.[*] instead of list[*] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c31cf4dc31c58ee783b6492a1fde82fb82f92e27;p=thirdparty%2Ffreeradius-server.git use list.[*] instead of list[*] --- diff --git a/src/tests/keywords/concat b/src/tests/keywords/concat index c71ca4da688..ca8b6997a77 100644 --- a/src/tests/keywords/concat +++ b/src/tests/keywords/concat @@ -13,14 +13,8 @@ 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") { diff --git a/src/tests/keywords/join b/src/tests/keywords/join index 2098b7b7f28..fd39b750e2a 100644 --- a/src/tests/keywords/join +++ b/src/tests/keywords/join @@ -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 diff --git a/src/tests/keywords/list-existence b/src/tests/keywords/list-existence index f4bf6d2a3eb..067b5016e85 100644 --- a/src/tests/keywords/list-existence +++ b/src/tests/keywords/list-existence @@ -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 } diff --git a/src/tests/keywords/pairs b/src/tests/keywords/pairs index 89c35127aba..bd77d944f3d 100644 --- a/src/tests/keywords/pairs +++ b/src/tests/keywords/pairs @@ -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.) ', ')" diff --git a/src/tests/keywords/policy.conf b/src/tests/keywords/policy.conf index 38fda3baa35..e595d5bf33a 100644 --- a/src/tests/keywords/policy.conf +++ b/src/tests/keywords/policy.conf @@ -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 } }