From: Alan T. DeKok Date: Fri, 5 Aug 2022 14:12:12 +0000 (-0400) Subject: more "convert to edit" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=809e4c44caec965842e5822550c05fc3a43676f2;p=thirdparty%2Ffreeradius-server.git more "convert to edit" --- diff --git a/src/tests/keywords/pap b/src/tests/keywords/pap index a00d9b177c3..84d8ac5efc3 100644 --- a/src/tests/keywords/pap +++ b/src/tests/keywords/pap @@ -1,17 +1,16 @@ # -# PRE: update update-remove-any if +# PRE: edit-list-remove if # -update { - &control !* ANY - &request.Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK" # 60 byte salt -} +&control := {} +&request.Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK" # 60 byte salt # # Unencoded Password.Cleartext in password with header # -update { - &control.Password.With-Header := "%{User-Password}" +&control := { + &Password.With-Header = "%{User-Password}" } + pap.authorize pap.authenticate { reject = 1 @@ -20,19 +19,14 @@ if (reject) { test_fail } -update { - &control !* ANY -} - # # Base64 encoded Password.Cleartext in password with header # -update { - &Tmp-String-1 := "{clear}%{User-Password}" -} -update { - &control.Password.With-Header := "%{base64:%{Tmp-String-1}}" +&Tmp-String-1 := "{clear}%{User-Password}" +&control := { + &Password.With-Header = "%{base64:%{Tmp-String-1}}" } + pap.authorize pap.authenticate { reject = 1 @@ -41,15 +35,11 @@ if (reject) { test_fail } -update { - &control !* ANY -} - # # Hex encoded SSHA password # -update { - &control.Password.With-Header += "{ssha}%{hex:%{sha1:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" +&control := { + &Password.With-Header = "{ssha}%{hex:%{sha1:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" } pap.authorize @@ -60,30 +50,19 @@ if (reject) { test_fail } -update { - &control !* ANY -} - # # Base64 encoded SSHA password # -update { - &control.Tmp-String-1 := "%{hex:%{sha1:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" +&control := { + &Tmp-String-1 = "%{hex:%{sha1:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" } # To Binary -update { - &control.Tmp-Octets-0 := "%{bin:%{control.Tmp-String-1}}" -} +&control.Tmp-Octets-0 := "%{bin:%{control.Tmp-String-1}}" # To Base64 -update { - &control.Tmp-String-1 := "%{base64:%{control.Tmp-Octets-0}}" -} - -update { - &control.Password.With-Header += "{ssha}%{control.Tmp-String-1}" -} +&control.Tmp-String-1 := "%{base64:%{control.Tmp-Octets-0}}" +&control.Password.With-Header := "{ssha}%{control.Tmp-String-1}" pap.authorize pap.authenticate { @@ -93,30 +72,19 @@ if (reject) { test_fail } -update { - &control !* ANY -} - # # Base64 of Base64 encoded SSHA password # -update { - &control.Tmp-String-1 := "%{hex:%{sha1:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" +&control := { + &Tmp-String-1 = "%{hex:%{sha1:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" } # To Binary -update { - &control.Tmp-Octets-0 := "%{bin:%{control.Tmp-String-1}}" -} +&control.Tmp-Octets-0 := "%{bin:%{control.Tmp-String-1}}" # To Base64 -update { - &control.Tmp-String-1 := "{ssha}%{base64:%{control.Tmp-Octets-0}}" -} - -update { - &control.Password.With-Header += "%{base64:%{control.Tmp-String-1}}" -} +&control.Tmp-String-1 := "{ssha}%{base64:%{control.Tmp-Octets-0}}" +&control.Password.With-Header := "%{base64:%{control.Tmp-String-1}}" pap.authorize pap.authenticate { @@ -126,12 +94,9 @@ if (reject) { test_fail } -update { - &control !* ANY -} -update control { - &Auth-Type := Accept +&control := { + &Auth-Type = Accept } success diff --git a/src/tests/keywords/pap-ssha2 b/src/tests/keywords/pap-ssha2 index 16b3f8f09a0..b193a43b0a6 100644 --- a/src/tests/keywords/pap-ssha2 +++ b/src/tests/keywords/pap-ssha2 @@ -1,27 +1,22 @@ # -# PRE: update if pap +# PRE: pap # # # Skip if the server wasn't built with openssl # if ('${feature.tls}' != 'yes') { - update reply { - &Packet-Type := Access-Accept - } + &reply.Packet-Type := Access-Accept handled } -update { - &control !* ANY - &Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK" # 60 byte salt -} +&Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK" # 60 byte salt # # Hex encoded SSHA2-512 password # -update { - &control.Password.With-Header += "{ssha512}%{hex:%{sha2_512:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" +&control := { + &Password.With-Header = "{ssha512}%{hex:%{sha2_512:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" } pap.authorize @@ -32,30 +27,20 @@ if (reject) { test_fail } -update { - &control !* ANY -} - # # Base64 encoded SSHA2-512 password # -update { - &control.Tmp-String-1 := "%{hex:%{sha2_512:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" +&control := { + &Tmp-String-1 = "%{hex:%{sha2_512:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" } # To Binary -update { - &control.Tmp-Octets-0 := "%{bin:%{control.Tmp-String-1}}" -} +&control.Tmp-Octets-0 := "%{bin:%{control.Tmp-String-1}}" # To Base64 -update { - &control.Tmp-String-1 := "%{base64:%{control.Tmp-Octets-0}}" -} +&control.Tmp-String-1 := "%{base64:%{control.Tmp-Octets-0}}" -update { - &control.Password.With-Header += "{ssha512}%{control.Tmp-String-1}" -} +&control.Password.With-Header += "{ssha512}%{control.Tmp-String-1}" pap.authorize pap.authenticate { @@ -65,30 +50,21 @@ if (reject) { test_fail } -update { - &control !* ANY -} # # Base64 of Base64 encoded SSHA2-512 password # -update { - &control.Tmp-String-1 := "%{hex:%{sha2_512:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" +&control := { + &Tmp-String-1 = "%{hex:%{sha2_512:%{User-Password}%{Tmp-String-0}}}%{hex:%{Tmp-String-0}}" } # To Binary -update { - &control.Tmp-Octets-0 := "%{bin:%{control.Tmp-String-1}}" -} +&control.Tmp-Octets-0 := "%{bin:%{control.Tmp-String-1}}" # To Base64 -update { - &control.Tmp-String-1 := "{ssha512}%{base64:%{control.Tmp-Octets-0}}" -} +&control.Tmp-String-1 := "{ssha512}%{base64:%{control.Tmp-Octets-0}}" -update { - &control.Password.With-Header += "%{base64:%{control.Tmp-String-1}}" -} +&control.Password.With-Header += "%{base64:%{control.Tmp-String-1}}" pap.authorize pap.authenticate { @@ -98,15 +74,11 @@ if (reject) { test_fail } -update { - &control !* ANY -} - # # Base64 of SHA2-384 password (in SHA2-Password) # -update control { - &control.Password.SHA2 := "%{hex:%{sha2_384:%{User-Password}}}" +&control := { + &Password.SHA2 = "%{hex:%{sha2_384:%{User-Password}}}" } pap.authorize @@ -117,19 +89,11 @@ if (reject) { test_fail } -update { - &control !* ANY -} - -update control { - &Auth-Type := Accept -} - # # Base64 of SHA2-256 password (in SHA2-256-Password) # -update control { - &control.Password.SHA2-256 := "%{hex:%{sha2_256:%{User-Password}}}" +&control := { + &Password.SHA2-256 = "%{hex:%{sha2_256:%{User-Password}}}" } pap.authorize @@ -140,15 +104,11 @@ if (reject) { test_fail } -update { - &control !* ANY -} - # # Base64 of SHA2-224 password (in SHA2-224-Password - No hex armour) # -update control { - &control.Password.SHA2-224 := "%{sha2_224:%{User-Password}}" +&control := { + &Password.SHA2-224 = "%{sha2_224:%{User-Password}}" } pap.authorize @@ -159,13 +119,8 @@ if (reject) { test_fail } -update { - &control !* ANY -} - - -update control { - &Auth-Type := Accept +&control := { + &Auth-Type = Accept } success diff --git a/src/tests/keywords/parallel-rcode b/src/tests/keywords/parallel-rcode index d890eb9e09f..e1e5f81ee1f 100644 --- a/src/tests/keywords/parallel-rcode +++ b/src/tests/keywords/parallel-rcode @@ -26,7 +26,7 @@ if (!fail) { group { parallel { fail - update request { # This should *NOT* be dispatched + group { # This should *NOT* be dispatched &Tmp-String-0 := 'foo' } } @@ -50,8 +50,8 @@ group { fail { fail = 10 # Higher priority than ok and no longer action return } - update parent.request { # This should now be dispatched - &Tmp-String-0 := 'foo' + group { # This should now be dispatched + &parent.request.Tmp-String-0 := 'foo' } } actions { diff --git a/src/tests/keywords/parallel-yield b/src/tests/keywords/parallel-yield index cc23e089262..2425cb10f65 100644 --- a/src/tests/keywords/parallel-yield +++ b/src/tests/keywords/parallel-yield @@ -5,8 +5,8 @@ # Ensure if one module yields, the rest execute parallel { reschedule - update parent.request { - &Tmp-String-0 := 'foo' + group { + &parent.request.Tmp-String-0 := 'foo' } } diff --git a/src/tests/keywords/rand b/src/tests/keywords/rand index eb6f65b21c3..ef3070c2faf 100644 --- a/src/tests/keywords/rand +++ b/src/tests/keywords/rand @@ -1,32 +1,25 @@ - -update request { - &Tmp-String-0 := "%{rand:-1}" -} +&Tmp-String-0 := "%{rand:-1}" # -# Negative limit should have failed +# Negative limit should have failed assignment # -if (&Tmp-String-0 != '') { +if (&Tmp-String-0) { test_fail } -update request { - &Tmp-String-0 := "%{rand:hello world}" -} +&Tmp-String-0 := "%{rand:hello world}" # -# Invalid limit should have failed +# Invalid limit should have failed assignment # -if (&Tmp-String-0 != '') { +if (&Tmp-String-0) { test_fail } -update request { - &Tmp-Integer-0 := "%{rand:123}" -} +&Tmp-Integer-0 := "%{rand:123}" # -# Make sure random number is whithin limit +# Make sure random number is within limit # if (&Tmp-Integer-0 < 0 || &Tmp-Integer-0 > 123) { test_fail diff --git a/src/tests/keywords/randstr b/src/tests/keywords/randstr index 090bb15d819..fe75538c886 100644 --- a/src/tests/keywords/randstr +++ b/src/tests/keywords/randstr @@ -1,13 +1,18 @@ - -update request { - &Tmp-String-0 := "%{randstr:%{Tmp-String-0}}" - &Tmp-String-1 := "%{randstr:nnn}" - &Tmp-String-2 := "%{randstr:24a}" - &Tmp-String-3 := "%{randstr:1030aa}" - &Tmp-String-4 := "%{randstr:G}" - &Tmp-String-5 := "%{randstr:10b}" +&request += { + &Tmp-String-1 = "%{randstr:nnn}" + &Tmp-String-2 = "%{randstr:24a}" + &Tmp-String-3 = "%{randstr:1030aa}" + &Tmp-String-5 = "%{randstr:10b}" } +# +# These next two assignments fail, so they can't go +# into the above list. If they were there, then the +# entire list assignment would fail. +# +&Tmp-String-0 := "%{randstr:%{Tmp-String-0}}" +&Tmp-String-4 := "%{randstr:G}" + # # Empty output on empty input # @@ -35,7 +40,7 @@ if ("%{strlen:%{Tmp-String-3}}" != 1025) { # # Check invalid character class # -if (&Tmp-String-4 != "") { +if (&Tmp-String-4) { test_fail } diff --git a/src/tests/keywords/redundant b/src/tests/keywords/redundant index e338e729870..f858ad9a858 100644 --- a/src/tests/keywords/redundant +++ b/src/tests/keywords/redundant @@ -1,21 +1,21 @@ -# PRE: update if foreach +# PRE: if foreach # # Redundant blocks. # # The first one fails, so the second one is used # -update request { - &Tmp-Integer-0 := 0 - &Tmp-Integer-1 += 0 - &Tmp-Integer-1 += 1 - &Tmp-Integer-1 += 2 - &Tmp-Integer-1 += 3 - &Tmp-Integer-1 += 4 - &Tmp-Integer-1 += 5 - &Tmp-Integer-1 += 6 - &Tmp-Integer-1 += 7 - &Tmp-Integer-1 += 8 - &Tmp-Integer-1 += 9 +&request += { + &Tmp-Integer-0 = 0 + &Tmp-Integer-1 = 0 + &Tmp-Integer-1 = 1 + &Tmp-Integer-1 = 2 + &Tmp-Integer-1 = 3 + &Tmp-Integer-1 = 4 + &Tmp-Integer-1 = 5 + &Tmp-Integer-1 = 6 + &Tmp-Integer-1 = 7 + &Tmp-Integer-1 = 8 + &Tmp-Integer-1 = 9 } redundant { @@ -43,9 +43,9 @@ foreach &Tmp-Integer-1 { fail } else { - update request { - &Tmp-Integer-0 := "%{expr:%{Tmp-Integer-0} + 1}" - &Filter-Id += "SUCCEED ODD %{Foreach-Variable-0} %{Tmp-Integer-0}" + &Tmp-Integer-0 += 1 + &request += { + &Tmp-String-0 = "Succeed odd %{Foreach-Variable-0} %{Tmp-Integer-0}" } ok } @@ -56,9 +56,9 @@ foreach &Tmp-Integer-1 { fail } else { - update request { - &Tmp-Integer-0 := "%{expr:%{Tmp-Integer-0} + 1}" - &Filter-Id += "SUCCEED EVEN %{Foreach-Variable-0} %{Tmp-Integer-0}" + &Tmp-Integer-0 += 1 + &request += { + &Tmp-String-0 = "Succeed even %{Foreach-Variable-0} %{Tmp-Integer-0}" } ok } @@ -69,6 +69,5 @@ foreach &Tmp-Integer-1 { if (&Tmp-Integer-0 != "%{Tmp-Integer-1[#]}") { test_fail } -else { - success -} + +success diff --git a/src/tests/keywords/redundant-load-balance b/src/tests/keywords/redundant-load-balance index 74c6e18552b..35aa1f19399 100644 --- a/src/tests/keywords/redundant-load-balance +++ b/src/tests/keywords/redundant-load-balance @@ -1,21 +1,21 @@ -# PRE: update if foreach +# PRE: if foreach # # Redundant blocks. # # The first one fails, so the second one is used # -update request { - &Tmp-Integer-0 := 0 - &Tmp-Integer-1 += 0 - &Tmp-Integer-1 += 1 - &Tmp-Integer-1 += 2 - &Tmp-Integer-1 += 3 - &Tmp-Integer-1 += 4 - &Tmp-Integer-1 += 5 - &Tmp-Integer-1 += 6 - &Tmp-Integer-1 += 7 - &Tmp-Integer-1 += 8 - &Tmp-Integer-1 += 9 +&request += { + &Tmp-Integer-0 = 0 + &Tmp-Integer-1 = 0 + &Tmp-Integer-1 = 1 + &Tmp-Integer-1 = 2 + &Tmp-Integer-1 = 3 + &Tmp-Integer-1 = 4 + &Tmp-Integer-1 = 5 + &Tmp-Integer-1 = 6 + &Tmp-Integer-1 = 7 + &Tmp-Integer-1 = 8 + &Tmp-Integer-1 = 9 } # @@ -29,9 +29,9 @@ foreach &Tmp-Integer-1 { fail } else { - update request { - &Tmp-Integer-0 := "%{expr:%{Tmp-Integer-0} + 1}" - &Filter-Id += "SUCCEED ODD %{Foreach-Variable-0} %{Tmp-Integer-0}" + &Tmp-Integer-0 += 1 + &request += { + &Tmp-String-0 = "Succeed odd %{Foreach-Variable-0} %{Tmp-Integer-0}" } ok } @@ -42,9 +42,9 @@ foreach &Tmp-Integer-1 { fail } else { - update request { - &Tmp-Integer-0 := "%{expr:%{Tmp-Integer-0} + 1}" - &Filter-Id += "SUCCEED EVEN %{Foreach-Variable-0} %{Tmp-Integer-0}" + &Tmp-Integer-0 += 1 + &request += { + &Tmp-String-0 = "Succeed even %{Foreach-Variable-0} %{Tmp-Integer-0}" } ok } @@ -53,11 +53,7 @@ foreach &Tmp-Integer-1 { } if (&Tmp-Integer-0 != "%{Tmp-Integer-1[#]}") { - update reply { - &Filter-Id := "shit %{Tmp-Integer-0}" - } test_fail } -else { - success -} + +success diff --git a/src/tests/keywords/redundant-redundant b/src/tests/keywords/redundant-redundant index 66c038f2bd5..01f51c511d2 100644 --- a/src/tests/keywords/redundant-redundant +++ b/src/tests/keywords/redundant-redundant @@ -1,55 +1,48 @@ -# PRE: update if foreach redundant redundant-load-balance +# PRE: redundant redundant-load-balance # # Nested redundant blocks. # # -update request { - &Tmp-Integer-2 := 0 - &Tmp-Integer-3 := 0 - &Tmp-Integer-4 := 0 - &Tmp-Integer-5 := 0 +&request += { + &Tmp-Integer-2 = 0 + &Tmp-Integer-3 = 0 + &Tmp-Integer-4 = 0 + &Tmp-Integer-5 = 0 } redundant { redundant-load-balance { group { - update request { - &Tmp-Integer-2 := "%{expr:&Tmp-Integer-2 + 1}" - } + &Tmp-Integer-2 += 1 fail } group { - update request { - &Tmp-Integer-3 := "%{expr:&Tmp-Integer-3 + 1}" - } + &Tmp-Integer-3 += 1 fail } group { - update request { - &Tmp-Integer-4 := "%{expr:&Tmp-Integer-4 + 1}" - } + &Tmp-Integer-4 += 1 fail } group { - update request { - &Tmp-Integer-5 := "%{expr:&Tmp-Integer-5 + 1}" - } + &Tmp-Integer-5 += 1 fail } } + + # + # All of the above fails, so we fail over to "ok". + # ok } if (!ok) { - update reply { - &Filter-Id := "did not return OK" - } + test_fail return } if (&Tmp-Integer-2 != 1) { test_fail - return } if (&Tmp-Integer-3 != 1) { diff --git a/src/tests/keywords/regex-escape b/src/tests/keywords/regex-escape index 9100edacf49..ce9f1b72a76 100644 --- a/src/tests/keywords/regex-escape +++ b/src/tests/keywords/regex-escape @@ -1,14 +1,14 @@ # -# PRE: update if +# PRE: if # # # Strings which are expanded in a regex have regex special # characters escaped. Because the input strings are unsafe. # -update request { - &Tmp-String-0 := "%{taint:example.com}" - &Tmp-String-1 := "%{taint:exampleXcom}" +&request += { + &Tmp-String-0 = "%{taint:example.com}" + &Tmp-String-1 = "%{taint:exampleXcom}" } if ("exampleXcom" =~ /%{Tmp-String-0}/) { @@ -18,6 +18,5 @@ if ("exampleXcom" =~ /%{Tmp-String-0}/) { elsif (&Tmp-String-1 =~ /%{Tmp-String-0}/) { test_fail } -else { - success -} + +success diff --git a/src/tests/keywords/regex-lhs b/src/tests/keywords/regex-lhs index 7e32e21f4e2..d5266a9079f 100644 --- a/src/tests/keywords/regex-lhs +++ b/src/tests/keywords/regex-lhs @@ -1,14 +1,14 @@ # -# PRE: update if regex-escape +# PRE: if regex-escape # # # Strings which are expanded in a regex have regex special # characters escaped. Because the input strings are unsafe. # -update request { - &Tmp-String-0 := "example.com" - &Tmp-String-1 := "^foo$bar" +&request += { + &Tmp-String-0 = "example.com" + &Tmp-String-1 = "^foo$bar" } if (&Tmp-String-0 !~ /example\.com$/) { @@ -16,6 +16,6 @@ if (&Tmp-String-0 !~ /example\.com$/) { } elsif (&Tmp-String-1 !~ /\^foo\$bar/) { test_fail -} else { - success } + +success diff --git a/src/tests/keywords/retry-section b/src/tests/keywords/retry-section index be7e8afa1b1..5df9fcdf2e3 100644 --- a/src/tests/keywords/retry-section +++ b/src/tests/keywords/retry-section @@ -1,13 +1,9 @@ -# PRE: update if +# PRE: if -update request { - &Tmp-Integer-0 := 0 -} +&Tmp-Integer-0 := 0 group { - update request { - &Tmp-Integer-0 := "%{expr: &Tmp-Integer-0 + 1}" - } + &Tmp-Integer-0 += 1 noop actions { diff --git a/src/tests/keywords/return b/src/tests/keywords/return index b3c884db8da..a79b8545a17 100644 --- a/src/tests/keywords/return +++ b/src/tests/keywords/return @@ -1,5 +1,5 @@ # -# PRE: update if +# PRE: if # if (&User-Name == "bob") { success @@ -9,9 +9,7 @@ if (&User-Name == "bob") { # will prevent the "pap" module from being run # in the "authorize" section. # - update control { - &Auth-Type := PAP - } + &control.Auth-Type := PAP # # Stop processing "authorize", and go to the next section. diff --git a/src/tests/keywords/return-break-mix b/src/tests/keywords/return-break-mix index f0e809d49d5..877edcfc876 100644 --- a/src/tests/keywords/return-break-mix +++ b/src/tests/keywords/return-break-mix @@ -1,11 +1,11 @@ # -# PRE: update if return foreach +# PRE: if return foreach # -update control { - &Tmp-Integer-0 += 0 - &Tmp-Integer-0 += 1 - &Tmp-Integer-0 += 2 - &Tmp-Integer-0 += 3 +&control += { + &Tmp-Integer-0 = 0 + &Tmp-Integer-0 = 1 + &Tmp-Integer-0 = 2 + &Tmp-Integer-0 = 3 } foreach &control.Tmp-Integer-0 { @@ -16,8 +16,8 @@ foreach &control.Tmp-Integer-0 { break } - update control { - &Tmp-Integer-0 -= "%{Foreach-Variable-0}" + &control -= { + &Tmp-Integer-0 == "%{Foreach-Variable-0}" } } diff --git a/src/tests/keywords/return-group b/src/tests/keywords/return-group index b3254b9b73f..0813cdf4219 100644 --- a/src/tests/keywords/return-group +++ b/src/tests/keywords/return-group @@ -1,9 +1,7 @@ # -# PRE: update if return +# PRE: return # -update { - &control.Auth-Type = 'Accept' -} +&control.Auth-Type := 'Accept' group { # Section should exit after this statement @@ -12,12 +10,8 @@ group { } # This entry should never be reached - update { - &reply.Reply-Message := 'fail' - } + &reply.Reply-Message := 'fail' } # We should continue processing after the previous group. -update { - &reply.Reply-Message += 'pass' -} +&reply.Reply-Message := 'pass' diff --git a/src/tests/keywords/return-section b/src/tests/keywords/return-section index 2f152589a98..ee59647328a 100644 --- a/src/tests/keywords/return-section +++ b/src/tests/keywords/return-section @@ -1,5 +1,5 @@ # -# PRE: update if return +# PRE: if return # if (&User-Name == "bob") { ok @@ -9,9 +9,7 @@ if (&User-Name == "bob") { # will prevent the "pap" module from being run # in the "authorize" section. # - update control { - &Auth-Type := PAP - } + &control.Auth-Type := PAP # # Stop processing "authorize", and go to the next section. diff --git a/src/tests/keywords/return-within-condition-dynamic b/src/tests/keywords/return-within-condition-dynamic index 5d16635fe29..97703b95ba9 100644 --- a/src/tests/keywords/return-within-condition-dynamic +++ b/src/tests/keywords/return-within-condition-dynamic @@ -1,5 +1,5 @@ # -# PRE: update if +# PRE: if # if (&User-Name == 'bob') { accept diff --git a/src/tests/keywords/return-within-condition-static b/src/tests/keywords/return-within-condition-static index 1fe227a0fcd..d211c63fc95 100644 --- a/src/tests/keywords/return-within-condition-static +++ b/src/tests/keywords/return-within-condition-static @@ -1,5 +1,5 @@ # -# PRE: update if return +# PRE: if return # if ("no" == no) { accept diff --git a/src/tests/keywords/return-within-foreach b/src/tests/keywords/return-within-foreach index e3f598792bb..3c2abb418fd 100644 --- a/src/tests/keywords/return-within-foreach +++ b/src/tests/keywords/return-within-foreach @@ -1,11 +1,11 @@ # -# PRE: update if return foreach +# PRE: if return foreach # -update control { - &Tmp-Integer-0 += 0 - &Tmp-Integer-0 += 1 - &Tmp-Integer-0 += 2 - &Tmp-Integer-0 += 3 +&control += { + &Tmp-Integer-0 = 0 + &Tmp-Integer-0 = 1 + &Tmp-Integer-0 = 2 + &Tmp-Integer-0 = 3 } group { diff --git a/src/tests/keywords/return-within-if-after-policy b/src/tests/keywords/return-within-if-after-policy index 38cc0707e03..b7015b16ae4 100644 --- a/src/tests/keywords/return-within-if-after-policy +++ b/src/tests/keywords/return-within-if-after-policy @@ -1,5 +1,5 @@ # -# PRE: update if return +# PRE: if return # # Defeats return check... diff --git a/src/tests/keywords/return-within-policy b/src/tests/keywords/return-within-policy index 80c8ab68b3e..ac4e9e74676 100644 --- a/src/tests/keywords/return-within-policy +++ b/src/tests/keywords/return-within-policy @@ -1,5 +1,5 @@ # -# PRE: update if return +# PRE: if return # group { # Return must stop after the policy, otherwise we don't setup the test for success