]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more a!=b --> !(a==b)
authorAlan T. DeKok <aland@freeradius.org>
Sat, 3 Dec 2022 20:31:38 +0000 (15:31 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 5 Dec 2022 16:08:21 +0000 (11:08 -0500)
perl -p -i -e 's/\(([^ ]+) != ("[^"]+")\)/(!($1 == $2))/g'
             's/\("([^"]+)" != ([^ ]+)\)/(!($1 == $2))/g'
     's/\("([^"]+)" != ("[^"]+")\)/(!($1 == $2))/g' ...

19 files changed:
src/tests/keywords/call
src/tests/keywords/call-empty
src/tests/keywords/comments
src/tests/keywords/concat
src/tests/keywords/date
src/tests/keywords/escape-sequences
src/tests/keywords/expr
src/tests/keywords/if-failed-xlat
src/tests/keywords/if-regex-match-named
src/tests/keywords/join
src/tests/keywords/map-xlat-nested-overwrite
src/tests/keywords/mschap
src/tests/keywords/pad
src/tests/keywords/unpack
src/tests/keywords/update-exec
src/tests/keywords/update-prepend
src/tests/keywords/xlat-exec
src/tests/keywords/xlat-soh
src/tests/keywords/xlat-subst

index 79a6ea0dbd123f1d8584872cc5bd977531170c5c..f551670eb0e58caff5abd074d639bb32608e0655 100644 (file)
@@ -11,11 +11,11 @@ if (!&reply.Reply-Message) {
        test_fail
 }
 
-if (&reply.Reply-Message[0] != "call second") {
+if (!(&reply.Reply-Message[0] == "call second")) {
        test_fail
 }
 
-if (&reply.Reply-Message[1] != "call second post") {
+if (!(&reply.Reply-Message[1] == "call second post")) {
        test_fail
 }
 
index de8a0b7320c09a68ad3c91e8f1c661e06450a8d8..a25e56cd6c175668223ce077a55b4fb2b14f0f15 100644 (file)
@@ -10,7 +10,7 @@ if (!&reply.Reply-Message) {
        test_fail
 }
 
-if (&reply.Reply-Message[0] != "call second") {
+if (!(&reply.Reply-Message[0] == "call second")) {
        test_fail
 }
 
index 1475115755d813bf032196b787e02885e40ec79a..d0237265b5a57ac8503a7213688c7ed5022b1d9f 100644 (file)
@@ -33,7 +33,7 @@ if (&request.Reply-Message[0] != 'I am #literally a comment #') {
        test_fail
 }
 
-if (&request.Reply-Message[1] != "I am #literally a comment #") {
+if (!(&request.Reply-Message[1] == "I am #literally a comment #")) {
        test_fail
 }
 
index ca8b6997a77625fe213053db95d0e573290ee408..7851f6c36b7a3f970363009c5e331f314473de34 100644 (file)
@@ -17,7 +17,7 @@ ok    # separate updates
        &Tmp-String-1 = "%(concat:%{request.[*]} ', ')"
 }
 
-if (&Tmp-String-1 != "bob, hello, ab c, de fg, 123") {
+if (!(&Tmp-String-1 == "bob, hello, ab c, de fg, 123")) {
        test_fail
 }
 
@@ -25,7 +25,7 @@ if (&Tmp-String-1 != "bob, hello, ab c, de fg, 123") {
        &Tmp-String-2 = "%(concat:%{Tmp-String-0[*]} ', ')"
 }
 
-if (&Tmp-String-2 != "ab c, de fg") {
+if (!(&Tmp-String-2 == "ab c, de fg")) {
        test_fail
 }
 
@@ -34,7 +34,7 @@ if (&Tmp-String-2 != "ab c, de fg") {
        &Tmp-String-3 = "%(concat:%{Tmp-String-0[*]})"
 }
 
-if (&Tmp-String-3 != "ab cde fg") {
+if (!(&Tmp-String-3 == "ab cde fg")) {
        test_fail
 }
 
@@ -43,7 +43,7 @@ if (&Tmp-String-3 != "ab cde fg") {
        &Tmp-String-4 = "%(concat:%{Tmp-String-0[*]} ,)"
 }
 
-if (&Tmp-String-4 != "ab c,de fg") {
+if (!(&Tmp-String-4 == "ab c,de fg")) {
        test_fail
 }
 
index 368060000e17f592c28700f41d49f089fc0a1e99..51efd12bd2908f89a940e6aac505ad61962009bd 100644 (file)
@@ -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
 }
 
@@ -66,7 +66,7 @@ if (&Tmp-String-5) {
        test_fail
 }
 
-if (&Module-Failure-Message != "Can't convert type ipaddr into date") {
+if (!(&Module-Failure-Message == "Can't convert type ipaddr into date")) {
        test_fail
 }
 
index a0378245d7728fc2c68f29a82d025abfd460f6e6..5a8003077b1c640bd3a222765f111794d133a32e 100644 (file)
@@ -28,11 +28,11 @@ if (!("%(length:%{Tmp-String-1})" == 42)) {
 }
 
 &Tmp-String-8 := "%{string:%{Tmp-Octets-0}}"
-if (&Tmp-String-8 != "i have scary embedded things\000 inside me") {
+if (!(&Tmp-String-8 == "i have scary embedded things\000 inside me")) {
        test_fail
 }
 
-if (&Tmp-String-0 != "i have scary embedded things\000 inside me") {
+if (!(&Tmp-String-0 == "i have scary embedded things\000 inside me")) {
        test_fail
 }
 
@@ -41,7 +41,7 @@ if (!(&Tmp-String-8 == "0x01\0010x07\0070x0A\n0x0D\r\"\"0xb0\260°")) {
        test_fail
 }
 
-if ("%{Tmp-String-0[0]}" != "i have scary embedded things\000 inside me") {
+if (!("%{Tmp-String-0[0]}" == "i have scary embedded things\000 inside me")) {
        test_fail
 }
 
index 448a3138d633eab4d94179eb3b49e815874916a3..b57810c4b5736b19664ccd321f49b84ac944a4e1 100644 (file)
@@ -5,7 +5,7 @@
 #
 #  Simple
 #
-if ("%{expr: 1 + 2 + 3 + 4}" != 10) {
+if (!(%{expr: 1 + 2 + 3 + 4} == 10)) {
        test_fail
 }
 if (1 + 2 + 3 + 4 != 10) {
@@ -15,7 +15,7 @@ if (1 + 2 + 3 + 4 != 10) {
 #
 #  Precedence
 #
-if ("%{expr: 1 + 2 * 3 + 4}" != 11) {
+if (!(%{expr: 1 + 2 * 3 + 4} == 11)) {
        test_fail
 }
 if (1 + 2 * 3 + 4 != 11) {
@@ -30,7 +30,7 @@ if (1 + 2 * 3 + 4 != 11) {
 &Tmp-Integer-2 := 4
 &Tmp-Date-0 := "%l"
 
-if ("%{expr: 1 + 2 * &Tmp-Integer-1 + 4}" != 11) {
+if (!(%{expr: 1 + 2 * &Tmp-Integer-1 + 4} == 11)) {
        test_fail
 }
 if (1 + 2 * &Tmp-Integer-1 + 4 != 11) {
@@ -38,56 +38,56 @@ if (1 + 2 * &Tmp-Integer-1 + 4 != 11) {
 }
 
 
-if ("%{expr: 1 + 2 * (&Tmp-Integer-1 + 4)}" != 15) {
+if (!(%{expr: 1 + 2 * (&Tmp-Integer-1 + 4)} == 15)) {
        test_fail
 }
 if (1 + 2 * (&Tmp-Integer-1 + 4) != 15) {
        test_fail
 }
 
-if ("%{expr: 1 + 2 * (&Tmp-Integer-1 + &Tmp-Integer-2)}" != 15) {
+if (!(%{expr: 1 + 2 * (&Tmp-Integer-1 + &Tmp-Integer-2)} == 15)) {
        test_fail
 }
 if (1 + 2 * (&Tmp-Integer-1 + &Tmp-Integer-2) != 15) {
        test_fail
 }
 
-if ("%{expr: 1 & ~1}" != 0) {
+if (!(%{expr: 1 & ~1} == 0)) {
        test_fail
 }
 if ((1 & ~1) != 0) {   # needs an extra () to resolve ambiguities and warnings
        test_fail
 }
 
-if ("%{expr: 1 & ~2}" != 1) {
+if (!(%{expr: 1 & ~2} == 1)) {
        test_fail
 }
 if ((1 & ~2) != 1) {   # needs an extra () to resolve ambiguities and warnings
        test_fail
 }
 
-if ("%{expr: -1 * 2}" != -2) {
+if (!(%{expr: -1 * 2} == -2)) {
        test_fail
 }
 if (-1 * 2 != -2) {
        test_fail
 }
 
-if ("%{expr: 11 % 2}" != 1) {
+if (!(%{expr: 11 % 2} == 1)) {
        test_fail
 }
 if (11 % 2 != 1) {
        test_fail
 }
 
-if ("%{expr: 2 - -1}" != 3) {
+if (!(%{expr: 2 - -1} == 3)) {
        test_fail
 }
 if (2 - -1 != 3) {
        test_fail
 }
 
-if ("%{expr: 1 << 2 | 1}" != 5) {
+if (!(%{expr: 1 << 2 | 1} == 5)) {
        test_fail
 }
 if (((1 << 2) | 1) != 5) {     # needs extra () to resolve precedence
@@ -104,14 +104,14 @@ if (&Tmp-Date-0 <= 0) {
 #
 #  Unary negation
 #
-if ("%{expr: 6 + -(1 + 3)}" != 2) {
+if (!(%{expr: 6 + -(1 + 3)} == 2)) {
        test_fail
 }
 if (6 + -(1 + 3) != 2) {
        test_fail
 }
 
-if ("%{expr: 6 * -&Tmp-Integer-2}" != -24) {
+if (!(%{expr: 6 * -&Tmp-Integer-2} == -24)) {
        test_fail
 }
 if (6 * -&Tmp-Integer-2 != -24) {
index 3ecfbd65b58f5cbedd2c7456439f8c6b26b439aa..2612b9f87319e7be50a847c9ba5ff43329e5c329 100644 (file)
@@ -10,7 +10,7 @@ if (%{regex:foo}) {
        test_fail
 }
 
-if (&Module-Failure-Message[*] != "No previous named regex capture group") {
+if (!(&Module-Failure-Message[*] == "No previous named regex capture group")) {
        test_fail
 }
 }
index 9adb9a6594f955f90b94b58a0173c1744fbc7dbf..b80c9dab4fa833e5377cdc53d5ba25bf6fa0455e 100644 (file)
@@ -11,7 +11,7 @@ if ("%{regex:}") {
        test_fail
 }
 
-if (&Module-Failure-Message[*] != "No previous regex capture") {
+if (!(&Module-Failure-Message[*] == "No previous regex capture")) {
        test_fail
 }
 
@@ -22,7 +22,7 @@ if ("%{regex:foo}") {
        test_fail
 }
 
-if (&Module-Failure-Message != "No previous named regex capture group") {
+if (!(&Module-Failure-Message == "No previous named regex capture group")) {
        test_fail
 }
 
@@ -33,7 +33,7 @@ if ("%{regex:%{Tmp-Integer-1}}") {
        test_fail
 }
 
-if (&Module-Failure-Message != "No previous numbered regex capture group") {
+if (!(&Module-Failure-Message == "No previous numbered regex capture group")) {
        test_fail
 }
 
index fd39b750e2abb97260ad8c60bbb2887f14ed6360..8b37bfe2b1b4ee9af33a38f3d6f441ce0b025e04 100644 (file)
 #
 &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") {
+if (!(&control.Tmp-String-1 == "bob. hello. ab c. de fg. 123. 192.168.1.254")) {
        test_fail
 }
 
 &Tmp-String-2 := "%(concat:%(join:%{Tmp-String-0[*]} %{Tmp-Integer-0}) ,)"
-if (&Tmp-String-2 != "ab c,de fg,123") {
+if (!(&Tmp-String-2 == "ab c,de fg,123")) {
        test_fail
 }
 
index 865078fb5211295676136887e441527f316e8765..986b16022d84a2bcd98d78d2aa3e496a92bdda3a 100644 (file)
@@ -13,7 +13,7 @@ if (!("%{map:%{Tmp-String-0}}" == 1)) {
        test_fail
 }
 
-if ("%{map:request.Tmp-Group-0.Tmp-String-1 := 'testing000'}" != 1) {
+if (!(%{map:request.Tmp-Group-0.Tmp-String-1 := 'testing000'} == 1)) {
        test_fail
 }
 
index e7879066a1d76c810c24f0224d46f7f812a4243e..47690e6ba447e71527c9c07676e5eacb4d3bdfb9 100644 (file)
@@ -81,7 +81,7 @@ if !(&Tmp-String-0 == "") {
        test_fail
 }
 
-if (&Module-Failure-Message != "Invalid MS-CHAP challenge length") {
+if (!(&Module-Failure-Message == "Invalid MS-CHAP challenge length")) {
        test_fail
 }
 
index 1ffebb7a84c60f53de8889d1799b7d15f02adf11..4c0948ba653495c8db68684663083acea8547394 100644 (file)
@@ -7,38 +7,38 @@
 #
 #      rpad tests
 #
-if ("%(rpad:%{Tmp-String-0} 7)" != "test   ") {
+if (!(%(rpad:%{Tmp-String-0} 7) == "test   ")) {
        test_fail
 }
 
-if ("%(rpad:%{Tmp-String-0} 2)" != "test") {
+if (!(%(rpad:%{Tmp-String-0} 2) == "test")) {
        test_fail
 }
 
-if ("%(rpad:%{Tmp-String-0} 7 x)" != "testxxx") {
+if (!(%(rpad:%{Tmp-String-0} 7 x) == "testxxx")) {
        test_fail
 }
 
-if ("%(rpad:%{Tmp-String-0} 7 xy)" != "testxyx") {
+if (!(%(rpad:%{Tmp-String-0} 7 xy) == "testxyx")) {
        test_fail
 }
 
 #
 #      lpad tests
 #
-if ("%(lpad:%{Tmp-String-0} 7)" != "   test") {
+if (!(%(lpad:%{Tmp-String-0} 7) == "   test")) {
        test_fail
 }
 
-if ("%(lpad:%{Tmp-String-0} 2)" != "test") {
+if (!(%(lpad:%{Tmp-String-0} 2) == "test")) {
        test_fail
 }
 
-if ("%(lpad:%{Tmp-String-0} 7 x)" != "xxxtest") {
+if (!(%(lpad:%{Tmp-String-0} 7 x) == "xxxtest")) {
        test_fail
 }
 
-if ("%(lpad:%{Tmp-String-0} 7 xy)" != "xyxtest") {
+if (!(%(lpad:%{Tmp-String-0} 7 xy) == "xyxtest")) {
        test_fail
 }
 
index a8dc488f5630cfc2738c4040d12e140f65ad57a7..42ab5af1dbff34f0b95546aa70fe536ab1204b37 100644 (file)
@@ -44,7 +44,7 @@ if !(&Tmp-String-1 == "") {
        test_fail
 }
 
-if (&Module-Failure-Message != "unpack offset 10 is larger than input data length 5") {
+if (!(&Module-Failure-Message == "unpack offset 10 is larger than input data length 5")) {
        test_fail
 }
 &request -= &Module-Failure-Message[*]
@@ -55,7 +55,7 @@ if !(&Tmp-String-1 == "") {
        test_fail
 }
 
-if (&Module-Failure-Message != "Invalid data type 'thing'") {
+if (!(&Module-Failure-Message == "Invalid data type 'thing'")) {
        test_fail
 }
 
@@ -65,7 +65,7 @@ if !(&Tmp-String-1 == "") {
        test_fail
 }
 
-if (&Module-Failure-Message != "unpack requires the input attribute to be 'string' or 'octets'") {
+if (!(&Module-Failure-Message == "unpack requires the input attribute to be 'string' or 'octets'")) {
        test_fail
 }
 &request -= &Module-Failure-Message[*]
@@ -78,7 +78,7 @@ if !(&Tmp-String-1 == "") {
        test_fail
 }
 
-if (&Module-Failure-Message != "Invalid hex string in '0x014sdgw'") {
+if (!(&Module-Failure-Message == "Invalid hex string in '0x014sdgw'")) {
        test_fail
 }
 &request -= &Module-Failure-Message[*]
@@ -91,7 +91,7 @@ if !(&Tmp-String-1 == "") {
        test_fail
 }
 
-if (&Module-Failure-Message != "Zero length hex string in '0x'") {
+if (!(&Module-Failure-Message == "Zero length hex string in '0x'")) {
        test_fail
 }
 
index 0ee24aff16e7ba371dfaff4141ff7de168e64367..adb54cedb47ced70f8719775c5e56f3217ec7f30 100644 (file)
@@ -9,7 +9,7 @@ update request {
        &Tmp-String-0 = `/bin/sh -c "echo 'foo bar baz'"`
 }
 
-if (!&Tmp-String-0 || (&Tmp-String-0 != "foo bar baz")) {
+if (!&Tmp-String-0 || (!(&Tmp-String-0 == "foo bar baz"))) {
        test_fail
 }
 
index 7c260d683dd31d269bcdb15f7deb6a93d3057a94..146c7d7acde66ec1fb64e30bc21750ea78971e4a 100644 (file)
@@ -28,7 +28,7 @@ update request {
 }
 
 # The prepended value should be first followd by the other two
-if (!(("%{Tmp-String-0[0]}" == 'boink')) || (!("%{Tmp-String-0[1]}" == 'foo')) || ("%{Tmp-String-0[2]}" != 'baz')) {
+if (!(("%{Tmp-String-0[0]}" == 'boink')) || (!("%{Tmp-String-0[1]}" == 'foo')) || (!(%{Tmp-String-0[2]} == 'baz'))) {
        test_fail
 }
 
@@ -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
 }
 
index 233e1d3758ffb7696910ccd30019c35db9f2f55e..e1e95c1c591840053d43b64c56f84417f1b92f5b 100644 (file)
@@ -1,12 +1,12 @@
 &Tmp-String-0 = "foo"
 &Tmp-String-1 := `/bin/echo hello 1234:%{Tmp-String-0} world`
 
-if (&Tmp-String-1 != "hello 1234:foo world") {
+if (!(&Tmp-String-1 == "hello 1234:foo world")) {
        test_fail
 }
 
 &Tmp-String-1 := `/bin/echo hello %{Tmp-String-0}:1234 world`
-if (&Tmp-String-1 != "hello foo:1234 world") {
+if (!(&Tmp-String-1 == "hello foo:1234 world")) {
        test_fail
 }
 
index 9004fe82025d613e4f9cf79e2fa40b647b46df76..d8409350297a4a9ec39b479be5b2d5b4527a3c07 100644 (file)
@@ -31,7 +31,7 @@ if (&Tmp-String-0) {
 &Tmp-String-0 := %(soh:OS)
 
 # OS version not set
-if ("%{Tmp-String-0}" != "Windows unknown") {
+if (!("%{Tmp-String-0}" == "Windows unknown")) {
        test_fail
 }
 
@@ -47,7 +47,7 @@ if ("%{Tmp-String-0}" != "Windows Vista / Server 2008 6.0.6001 sp 1.0" ) {
 &Tmp-String-0 := %(soh:OS)
 
 # Version and Release combination that does not exist
-if ("%{Tmp-String-0}" != "Windows Other 6.5.6001 sp 1.0") {
+if (!("%{Tmp-String-0}" == "Windows Other 6.5.6001 sp 1.0")) {
        test_fail
 }
 
@@ -56,7 +56,7 @@ if ("%{Tmp-String-0}" != "Windows Other 6.5.6001 sp 1.0") {
 &Tmp-String-0 := %(soh:OS)
 
 # Version that does not exist
-if ("%{Tmp-String-0}" != "Windows Other 8.0.6001 sp 1.0") {
+if (!("%{Tmp-String-0}" == "Windows Other 8.0.6001 sp 1.0")) {
        test_fail
 }
 
index b5efd019e786cb1379a0cc1ed98fff060ec48283..bb30c67d165110b07f0a95a5abd244826e650f33 100644 (file)
@@ -7,68 +7,68 @@
 #
 
 # Global substitution
-if ("%(subst:%{Tmp-String-0} a b)" != 'bbb') {
+if (!(%(subst:%{Tmp-String-0} a b) == 'bbb')) {
        test_fail
 }
 
 # No match
-if ("%(subst:%{Tmp-String-0} c b)" != 'aaa') {
+if (!(%(subst:%{Tmp-String-0} c b) == 'aaa')) {
        test_fail
 }
 
 # Line ending rewrite
-if ("%(subst:%{Tmp-String-1} \n \r)" != "\r\r\r") {
+if (!(%(subst:%{Tmp-String-1} \n \r) == "\r\r\r")) {
        test_fail
 }
 
 # Removal
-if ("%(subst:%{Tmp-String-0} a '')" != "") {
+if (!(%(subst:%{Tmp-String-0} a '') == "")) {
        test_fail
 }
 
 # Removal of last word only
-if ("%(subst:%{Tmp-String-2} dog '')" != "the quick brown fox jumped over the lazy ") {
+if (!(%(subst:%{Tmp-String-2} dog '') == "the quick brown fox jumped over the lazy ")) {
        test_fail
 }
 
 # Removal of first and subsequent word
-if ("%(subst:%{Tmp-String-2} the '')" != " quick brown fox jumped over  lazy dog") {
+if (!(%(subst:%{Tmp-String-2} the '') == " quick brown fox jumped over  lazy dog")) {
        test_fail
 }
 
 # Removal of middle word
-if ("%(subst:%{Tmp-String-2} jumped '')" != "the quick brown fox  over the lazy dog") {
+if (!(%(subst:%{Tmp-String-2} jumped '') == "the quick brown fox  over the lazy dog")) {
        test_fail
 }
 
 # Replacement of last word only
-if ("%(subst:%{Tmp-String-2} dog cat)" != "the quick brown fox jumped over the lazy cat") {
+if (!(%(subst:%{Tmp-String-2} dog cat) == "the quick brown fox jumped over the lazy cat")) {
        test_fail
 }
 
 # Replacement of first and subsequent word
-if ("%(subst:%{Tmp-String-2} the cat)" != "cat quick brown fox jumped over cat lazy dog") {
+if (!(%(subst:%{Tmp-String-2} the cat) == "cat quick brown fox jumped over cat lazy dog")) {
        test_fail
 }
 
 # Replacement of middle word
-if ("%(subst:%{Tmp-String-2} jumped cat)" != "the quick brown fox cat over the lazy dog") {
+if (!(%(subst:%{Tmp-String-2} jumped cat) == "the quick brown fox cat over the lazy dog")) {
        test_fail
 }
 
 if ("${feature.regex-pcre2}" == 'yes') {
 # Basic substitutions
-if ("%(subst:%{Tmp-String-0} /a/ b)" != 'baa') {
+if (!(%(subst:%{Tmp-String-0} /a/ b) == 'baa')) {
        test_fail
 }
 
 # Global substitution
-if ("%(subst:%{Tmp-String-0} /a/g b)" != 'bbb') {
+if (!(%(subst:%{Tmp-String-0} /a/g b) == 'bbb')) {
        test_fail
 }
 
 # No match
-if ("%(subst:%{Tmp-String-0} /z/ b)" != 'aaa') {
+if (!(%(subst:%{Tmp-String-0} /z/ b) == 'aaa')) {
        test_fail
 }
 
@@ -82,21 +82,21 @@ if (!("%(length:%{Tmp-String-1})" == 3)) {
 }
 
 # Strip out just the first newline
-if ("%(subst:%{Tmp-String-1} /^./s '')" != "\n\n") {
+if (!(%(subst:%{Tmp-String-1} /^./s '') == "\n\n")) {
        test_fail
 }
 
-if ("%(subst:%{Tmp-String-1} /\n/ '')" != "\n\n") {
+if (!(%(subst:%{Tmp-String-1} /\n/ '') == "\n\n")) {
        test_fail
 }
 
 # Strip out all the newlines
-if ("%(subst:%{Tmp-String-1} /\n/g '')" != '') {
+if (!(%(subst:%{Tmp-String-1} /\n/g '') == '')) {
        test_fail
 }
 
 # Line ending switch
-if ("%(subst:%{Tmp-String-1} /\n/g \r)" != "\r\r\r") {
+if (!(%(subst:%{Tmp-String-1} /\n/g \r) == "\r\r\r")) {
        test_fail
 }