From: Alan T. DeKok Date: Sat, 3 Dec 2022 20:31:38 +0000 (-0500) Subject: more a!=b --> !(a==b) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6239c3ac9f842460bf2143406e0a1ca2b5152c9;p=thirdparty%2Ffreeradius-server.git more a!=b --> !(a==b) perl -p -i -e 's/\(([^ ]+) != ("[^"]+")\)/(!($1 == $2))/g' 's/\("([^"]+)" != ([^ ]+)\)/(!($1 == $2))/g' 's/\("([^"]+)" != ("[^"]+")\)/(!($1 == $2))/g' ... --- diff --git a/src/tests/keywords/call b/src/tests/keywords/call index 79a6ea0dbd1..f551670eb0e 100644 --- a/src/tests/keywords/call +++ b/src/tests/keywords/call @@ -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 } diff --git a/src/tests/keywords/call-empty b/src/tests/keywords/call-empty index de8a0b7320c..a25e56cd6c1 100644 --- a/src/tests/keywords/call-empty +++ b/src/tests/keywords/call-empty @@ -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 } diff --git a/src/tests/keywords/comments b/src/tests/keywords/comments index 1475115755d..d0237265b5a 100644 --- a/src/tests/keywords/comments +++ b/src/tests/keywords/comments @@ -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 } diff --git a/src/tests/keywords/concat b/src/tests/keywords/concat index ca8b6997a77..7851f6c36b7 100644 --- a/src/tests/keywords/concat +++ b/src/tests/keywords/concat @@ -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 } diff --git a/src/tests/keywords/date b/src/tests/keywords/date index 368060000e1..51efd12bd29 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 } @@ -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 } diff --git a/src/tests/keywords/escape-sequences b/src/tests/keywords/escape-sequences index a0378245d77..5a8003077b1 100644 --- a/src/tests/keywords/escape-sequences +++ b/src/tests/keywords/escape-sequences @@ -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 } diff --git a/src/tests/keywords/expr b/src/tests/keywords/expr index 448a3138d63..b57810c4b57 100644 --- a/src/tests/keywords/expr +++ b/src/tests/keywords/expr @@ -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) { diff --git a/src/tests/keywords/if-failed-xlat b/src/tests/keywords/if-failed-xlat index 3ecfbd65b58..2612b9f8731 100644 --- a/src/tests/keywords/if-failed-xlat +++ b/src/tests/keywords/if-failed-xlat @@ -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 } } diff --git a/src/tests/keywords/if-regex-match-named b/src/tests/keywords/if-regex-match-named index 9adb9a6594f..b80c9dab4fa 100644 --- a/src/tests/keywords/if-regex-match-named +++ b/src/tests/keywords/if-regex-match-named @@ -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 } diff --git a/src/tests/keywords/join b/src/tests/keywords/join index fd39b750e2a..8b37bfe2b1b 100644 --- a/src/tests/keywords/join +++ b/src/tests/keywords/join @@ -25,12 +25,12 @@ # &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 } diff --git a/src/tests/keywords/map-xlat-nested-overwrite b/src/tests/keywords/map-xlat-nested-overwrite index 865078fb521..986b16022d8 100644 --- a/src/tests/keywords/map-xlat-nested-overwrite +++ b/src/tests/keywords/map-xlat-nested-overwrite @@ -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 } diff --git a/src/tests/keywords/mschap b/src/tests/keywords/mschap index e7879066a1d..47690e6ba44 100644 --- a/src/tests/keywords/mschap +++ b/src/tests/keywords/mschap @@ -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 } diff --git a/src/tests/keywords/pad b/src/tests/keywords/pad index 1ffebb7a84c..4c0948ba653 100644 --- a/src/tests/keywords/pad +++ b/src/tests/keywords/pad @@ -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 } diff --git a/src/tests/keywords/unpack b/src/tests/keywords/unpack index a8dc488f563..42ab5af1dbf 100644 --- a/src/tests/keywords/unpack +++ b/src/tests/keywords/unpack @@ -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 } diff --git a/src/tests/keywords/update-exec b/src/tests/keywords/update-exec index 0ee24aff16e..adb54cedb47 100644 --- a/src/tests/keywords/update-exec +++ b/src/tests/keywords/update-exec @@ -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 } diff --git a/src/tests/keywords/update-prepend b/src/tests/keywords/update-prepend index 7c260d683dd..146c7d7acde 100644 --- a/src/tests/keywords/update-prepend +++ b/src/tests/keywords/update-prepend @@ -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 } diff --git a/src/tests/keywords/xlat-exec b/src/tests/keywords/xlat-exec index 233e1d3758f..e1e95c1c591 100644 --- a/src/tests/keywords/xlat-exec +++ b/src/tests/keywords/xlat-exec @@ -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 } diff --git a/src/tests/keywords/xlat-soh b/src/tests/keywords/xlat-soh index 9004fe82025..d8409350297 100644 --- a/src/tests/keywords/xlat-soh +++ b/src/tests/keywords/xlat-soh @@ -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 } diff --git a/src/tests/keywords/xlat-subst b/src/tests/keywords/xlat-subst index b5efd019e78..bb30c67d165 100644 --- a/src/tests/keywords/xlat-subst +++ b/src/tests/keywords/xlat-subst @@ -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 }