From: Alan T. DeKok Date: Mon, 5 Dec 2022 03:07:27 +0000 (-0500) Subject: global search and replace X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1abe58afdb6ad78c6146131f7abbe3f39d3834f8;p=thirdparty%2Ffreeradius-server.git global search and replace perl -p -i -e 's/\(([^ ]+) != ([^ ]+)\)/(!($1 == $2))/g' --- diff --git a/src/tests/keywords/date b/src/tests/keywords/date index 51efd12bd29..228593764b1 100644 --- a/src/tests/keywords/date +++ b/src/tests/keywords/date @@ -9,7 +9,7 @@ &Tmp-String-0 := %(date:%{Tmp-Integer-0}) # Some systems report GMT some UTC... -if (!(&Tmp-String-0 == "Fri 22 Sep 17:25:00 GMT 2017")) && (&Tmp-String-0 != "Fri 22 Sep 17:25:00 UTC 2017") { +if (!(&Tmp-String-0 == "Fri 22 Sep 17:25:00 GMT 2017")) && (!(&Tmp-String-0 == "Fri 22 Sep 17:25:00 UTC 2017")) { test_fail } diff --git a/src/tests/keywords/foreach-isolation b/src/tests/keywords/foreach-isolation index e065708ea63..9e795e769a1 100644 --- a/src/tests/keywords/foreach-isolation +++ b/src/tests/keywords/foreach-isolation @@ -17,7 +17,7 @@ if (!&Tmp-String-0[0] || !&Tmp-String-0[1] || !&Tmp-String-0[2] || !&Tmp-String- test_fail } -if (!((&Tmp-String-0[0] == '0')) || (!(&Tmp-String-0[1] == '1')) || (&Tmp-String-0[2] != '2') || (&Tmp-String-0[3] != '3')) { +if (!((&Tmp-String-0[0] == '0')) || (!(&Tmp-String-0[1] == '1')) || (!(&Tmp-String-0[2] == '2')) || (!(&Tmp-String-0[3] == '3'))) { test_fail } diff --git a/src/tests/keywords/update-delete b/src/tests/keywords/update-delete index d01367a3d58..25188d4b6e6 100644 --- a/src/tests/keywords/update-delete +++ b/src/tests/keywords/update-delete @@ -8,7 +8,7 @@ update request { &Tmp-IP-Address-0 := 192.0.2.1 } -if (!((&Tmp-String-0 == 'foobarbaz')) || (!(&Tmp-Integer-0 == 123456789)) || (&Tmp-IP-Address-0 != 192.0.2.1)) { +if (!((&Tmp-String-0 == 'foobarbaz')) || (!(&Tmp-Integer-0 == 123456789)) || (!(&Tmp-IP-Address-0 == 192.0.2.1))) { test_fail } diff --git a/src/tests/keywords/update-index b/src/tests/keywords/update-index index 1f02b7f5702..a7c3baa33e8 100644 --- a/src/tests/keywords/update-index +++ b/src/tests/keywords/update-index @@ -7,7 +7,7 @@ update { &control.Reply-Message += 'c' } -if (!((&control.Reply-Message[0] == 'a')) || (!(&control.Reply-Message[1] == 'b')) || (&control.Reply-Message[2] != 'c')) { +if (!((&control.Reply-Message[0] == 'a')) || (!(&control.Reply-Message[1] == 'b')) || (!(&control.Reply-Message[2] == 'c'))) { test_fail } @@ -16,7 +16,7 @@ update { &control.Reply-Message[1] := 'd' } -if (!((&control.Reply-Message[0] == 'a')) || (!(&control.Reply-Message[1] == 'd')) || (&control.Reply-Message[2] != 'c')) { +if (!((&control.Reply-Message[0] == 'a')) || (!(&control.Reply-Message[1] == 'd')) || (!(&control.Reply-Message[2] == 'c'))) { test_fail } @@ -25,7 +25,7 @@ update { &control.Reply-Message[0] := &control.Reply-Message[0] } -if (!((&control.Reply-Message[0] == 'a')) || (!(&control.Reply-Message[1] == 'd')) || (&control.Reply-Message[2] != 'c')) { +if (!((&control.Reply-Message[0] == 'a')) || (!(&control.Reply-Message[1] == 'd')) || (!(&control.Reply-Message[2] == 'c'))) { test_fail } diff --git a/src/tests/keywords/update-prepend b/src/tests/keywords/update-prepend index 146c7d7acde..4666f981079 100644 --- a/src/tests/keywords/update-prepend +++ b/src/tests/keywords/update-prepend @@ -47,7 +47,7 @@ update { } # The attributes should now be "wibble", "foo", "baz", "boink", "foo", "baz" -if (!(("%{Tmp-String-0[0]}" == 'wibble')) || (!("%{Tmp-String-0[1]}" == 'foo')) || (!(%{Tmp-String-0[2]} == 'baz')) || ("%{Tmp-String-0[3]}" != 'boink') || ("%{Tmp-String-0[4]}" != 'foo') || ("%{Tmp-String-0[5]}" != 'baz')) { +if (!(("%{Tmp-String-0[0]}" == 'wibble')) || (!("%{Tmp-String-0[1]}" == 'foo')) || (!(%{Tmp-String-0[2]} == 'baz')) || (!("%{Tmp-String-0[3]}" == 'boink')) || (!("%{Tmp-String-0[4]}" == 'foo')) || (!("%{Tmp-String-0[5]}" == 'baz'))) { test_fail } @@ -71,7 +71,7 @@ update { } # The control attributes should now be "wibble", "foo", "baz", "boink", "foo", "baz", "initial" -if (!(("%{control.Tmp-String-0[0]}" == 'wibble')) || (!("%{control.Tmp-String-0[1]}" == 'foo')) || (!(%{control.Tmp-String-0[2]} == 'baz')) || ("%{control.Tmp-String-0[3]}" != 'boink') || ("%{control.Tmp-String-0[4]}" != 'foo') || ("%{control.Tmp-String-0[5]}" != 'baz') || ("%{control.Tmp-String-0[6]}" != 'initial')) { +if (!(("%{control.Tmp-String-0[0]}" == 'wibble')) || (!("%{control.Tmp-String-0[1]}" == 'foo')) || (!(%{control.Tmp-String-0[2]} == 'baz')) || (!("%{control.Tmp-String-0[3]}" == 'boink')) || (!("%{control.Tmp-String-0[4]}" == 'foo')) || (!("%{control.Tmp-String-0[5]}" == 'baz')) || (!("%{control.Tmp-String-0[6]}" == 'initial'))) { test_fail } diff --git a/src/tests/keywords/update-remove-list b/src/tests/keywords/update-remove-list index d01367a3d58..25188d4b6e6 100644 --- a/src/tests/keywords/update-remove-list +++ b/src/tests/keywords/update-remove-list @@ -8,7 +8,7 @@ update request { &Tmp-IP-Address-0 := 192.0.2.1 } -if (!((&Tmp-String-0 == 'foobarbaz')) || (!(&Tmp-Integer-0 == 123456789)) || (&Tmp-IP-Address-0 != 192.0.2.1)) { +if (!((&Tmp-String-0 == 'foobarbaz')) || (!(&Tmp-Integer-0 == 123456789)) || (!(&Tmp-IP-Address-0 == 192.0.2.1))) { test_fail }