]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
change (foo != bar) to !(foo == bar)
authorAlan T. DeKok <aland@freeradius.org>
Tue, 29 Nov 2022 23:26:34 +0000 (18:26 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 29 Nov 2022 23:27:18 +0000 (18:27 -0500)
See previous commit for long explanation, and Perl script which
made the changes

100 files changed:
src/tests/keywords/array
src/tests/keywords/attr-index
src/tests/keywords/base64
src/tests/keywords/cmp-ipaddr
src/tests/keywords/comments
src/tests/keywords/date
src/tests/keywords/debug
src/tests/keywords/edit
src/tests/keywords/edit-group
src/tests/keywords/edit-intersection
src/tests/keywords/edit-leaf
src/tests/keywords/edit-leaf-multivalue
src/tests/keywords/edit-leaf-octets
src/tests/keywords/edit-leaf-star
src/tests/keywords/edit-list
src/tests/keywords/edit-list-remove
src/tests/keywords/edit-list-star
src/tests/keywords/edit-list-string
src/tests/keywords/edit-nested
src/tests/keywords/edit-string
src/tests/keywords/edit-union
src/tests/keywords/escape
src/tests/keywords/escape-sequences
src/tests/keywords/ethernet
src/tests/keywords/foreach-isolation
src/tests/keywords/foreach-varied-depth
src/tests/keywords/hex
src/tests/keywords/if-bob
src/tests/keywords/if-else
src/tests/keywords/if-elsif
src/tests/keywords/if-multivalue
src/tests/keywords/if-regex-empty
src/tests/keywords/if-regex-match
src/tests/keywords/if-regex-match-comp
src/tests/keywords/if-regex-match-named
src/tests/keywords/if-regex-multivalue
src/tests/keywords/ipaddr
src/tests/keywords/ipaddr.raw
src/tests/keywords/ipprefix
src/tests/keywords/length
src/tests/keywords/map-csv-prepend
src/tests/keywords/map-xlat
src/tests/keywords/map-xlat-nested
src/tests/keywords/map-xlat-nested-overwrite
src/tests/keywords/map-xlat-struct
src/tests/keywords/md4
src/tests/keywords/md5
src/tests/keywords/pack
src/tests/keywords/pairs
src/tests/keywords/parallel
src/tests/keywords/parallel-rcode
src/tests/keywords/parallel-yield
src/tests/keywords/randstr
src/tests/keywords/redundant
src/tests/keywords/redundant-load-balance
src/tests/keywords/redundant-redundant
src/tests/keywords/retry-section
src/tests/keywords/return-break-mix
src/tests/keywords/sha1
src/tests/keywords/sha2
src/tests/keywords/subrequest
src/tests/keywords/subrequest-attr
src/tests/keywords/subrequest-if
src/tests/keywords/subrequest-return
src/tests/keywords/subrequest-src-dst
src/tests/keywords/subrequest-src-dst-nested
src/tests/keywords/tolower
src/tests/keywords/toupper
src/tests/keywords/truncation
src/tests/keywords/unknown
src/tests/keywords/update-array
src/tests/keywords/update-attr-ref-null
src/tests/keywords/update-delete
src/tests/keywords/update-exec
src/tests/keywords/update-filter
src/tests/keywords/update-hex
src/tests/keywords/update-index
src/tests/keywords/update-list-null-rhs
src/tests/keywords/update-null-value-assign
src/tests/keywords/update-prepend
src/tests/keywords/update-remove-any
src/tests/keywords/update-remove-list
src/tests/keywords/update-to-edit
src/tests/keywords/urlquote
src/tests/keywords/vendor_specific.raw
src/tests/keywords/wimax
src/tests/keywords/xlat-alternation
src/tests/keywords/xlat-attr-index
src/tests/keywords/xlat-config
src/tests/keywords/xlat-dhcpv4
src/tests/keywords/xlat-double-alternation
src/tests/keywords/xlat-escape
src/tests/keywords/xlat-eval
src/tests/keywords/xlat-exec
src/tests/keywords/xlat-explode
src/tests/keywords/xlat-inline
src/tests/keywords/xlat-interpreter
src/tests/keywords/xlat-octets
src/tests/keywords/xlat-string
src/tests/keywords/xlat-subst

index e631fe4f2f804351e8fb53a4340306097e2e7205..3b29090d2268d77964eab02646a3503eb0330b3d 100644 (file)
@@ -9,19 +9,19 @@
        &Class = 0x090a0b0c,
 }
 
-if (%{Class[#]} != 3) {
+if (!(%{Class[#]} == 3)) {
        test_fail
 }
 
-if (&Class[0] != 0x01020304) {
+if (!(&Class[0] == 0x01020304)) {
        test_fail
 }
 
-if (&Class[1] != 0x05060708) {
+if (!(&Class[1] == 0x05060708)) {
        test_fail
 }
 
-if (&Class[2] != 0x090a0b0c) {
+if (!(&Class[2] == 0x090a0b0c)) {
        test_fail
 }
 
@@ -31,7 +31,7 @@ if (&Class[3]) {
 }
 
 # Last element of the array
-if (&Class[n] != 0x090a0b0c) {
+if (!(&Class[n] == 0x090a0b0c)) {
        test_fail
 }
 
index 31c9ce2bf20b06d3b625be5d383f60165be7d8d6..5f6d437e26a4d6557fd0bf6b59d84077c08c2a5c 100644 (file)
@@ -6,29 +6,29 @@
 
 &Tmp-String-0[1] := "yellow"
 
-if ("%{Tmp-String-0[*]}" != "fooyellowbaz") {
+if (!("%{Tmp-String-0[*]}" == "fooyellowbaz")) {
        test_fail
 }
 
 &Tmp-String-0[2] += "red"
 
-if ("%{Tmp-String-0[*]}" != "fooyellowbazred") {
+if (!("%{Tmp-String-0[*]}" == "fooyellowbazred")) {
        test_fail
 }
 
 &Tmp-String-0[2] -= "red"
 
-if ("%{Tmp-String-0[*]}" != "fooyellowbaz") {
+if (!("%{Tmp-String-0[*]}" == "fooyellowbaz")) {
        test_fail
 }
 
 &Tmp-String-0[0] := "oof"
-if ("%{Tmp-String-0[*]}" != "oofyellowbaz") {
+if (!("%{Tmp-String-0[*]}" == "oofyellowbaz")) {
        test_fail
 }
 
 &Tmp-String-0[1] := "bar"
-if ("%{Tmp-String-0[*]}" != "oofbarbaz") {
+if (!("%{Tmp-String-0[*]}" == "oofbarbaz")) {
        test_fail
 }
 
index 696c26d31ac66da895503a39a8b5cb77be09e54c..c3346c340090d249c718462b2764d5ef9a3640a7 100644 (file)
@@ -30,42 +30,42 @@ ok
 }
 
 # String - bin 0x39383730
-if (&Tmp-String-0[0] != 'OTg3MA==') {
+if (!(&Tmp-String-0[0] == 'OTg3MA==')) {
        test_fail
 }
 
 # Octets - bin 0x39383731
-if (&Tmp-String-1[0] != 'OTg3MQ==') {
+if (!(&Tmp-String-1[0] == 'OTg3MQ==')) {
        test_fail
 }
 
 # IP Address - bin 0x39383732
-if (&Tmp-String-2[0] != 'OTg3Mg==') {
+if (!(&Tmp-String-2[0] == 'OTg3Mg==')) {
        test_fail
 }
 
 # Integer - bin 0x39383734
-if (&Tmp-String-4[0] != 'OTg3NA==') {
+if (!(&Tmp-String-4[0] == 'OTg3NA==')) {
        test_fail
 }
 
 # ifid - bin 0x0000000039383737
-if (&Tmp-String-6[0] != 'AAAAADk4Nzc=') {
+if (!(&Tmp-String-6[0] == 'AAAAADk4Nzc=')) {
        test_fail
 }
 
 # ipv6addr - bin 0x00000000000000000000000039383738
-if (&Tmp-String-7[0] != 'AAAAAAAAAAAAAAAAOTg3OA==') {
+if (!(&Tmp-String-7[0] == 'AAAAAAAAAAAAAAAAOTg3OA==')) {
        test_fail
 }
 
 # ipv6addrprefix - bin 0x008000000000000000000000000039383739
-if (&Tmp-String-8[0] != 'AIAAAAAAAAAAAAAAAAA5ODc5') {
+if (!(&Tmp-String-8[0] == 'AIAAAAAAAAAAAAAAAAA5ODc5')) {
        test_fail
 }
 
 # byte - bin 0x3a
-if (&Tmp-String-9[0] != 'Og==') {
+if (!(&Tmp-String-9[0] == 'Og==')) {
        test_fail
 }
 
@@ -77,22 +77,22 @@ if (&Tmp-String-9[0] != 'Og==') {
 }
 
 # short - bin 0x373b
-if (&Tmp-String-0[0] != 'Nzs=') {
+if (!(&Tmp-String-0[0] == 'Nzs=')) {
        test_fail
 }
 
 # ethernet - bin 0x00003938373c
-if (&Tmp-String-1[0] != 'AAA5ODc8') {
+if (!(&Tmp-String-1[0] == 'AAA5ODc8')) {
        test_fail
 }
 
 # integer64 - bin 0x100000003938373d
-if (&Tmp-String-2[0] != 'EAAAADk4Nz0=') {
+if (!(&Tmp-String-2[0] == 'EAAAADk4Nz0=')) {
        test_fail
 }
 
 # ipv4prefix - bin 0x203938373e
-if (&Tmp-String-3[0] != 'IDk4Nz4=') {
+if (!(&Tmp-String-3[0] == 'IDk4Nz4=')) {
        test_fail
 }
 
@@ -101,11 +101,12 @@ if (&Tmp-String-3[0] != 'IDk4Nz4=') {
        &Tmp-Octets-1           = "%{base64decode:AIAAAAAAAAAAAAAAAAA5ODc5}"
 }
 
-if (&Tmp-Octets-0 != "foo") {
+if (!(&Tmp-Octets-0 == "foo")) {
+       debug_request
        test_fail
 }
 
-if (&Tmp-Octets-1 != 0x008000000000000000000000000039383739) {
+if (!(&Tmp-Octets-1 == 0x008000000000000000000000000039383739)) {
        test_fail
 }
 
@@ -113,14 +114,14 @@ if (&Tmp-Octets-1 != 0x008000000000000000000000000039383739) {
 &request -= &Tmp-Octets-0[*]
 &Tmp-Octets-0 := %{base64decode:5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK}
 
-if (&Tmp-Octets-0 != 0xe5136a365f2260b6e409cec9851f1ab384ed0c3097ea8b6eb96b5c8daf2b213532c7dceb9c749ef6d4c71a628a) {
+if (!(&Tmp-Octets-0 == 0xe5136a365f2260b6e409cec9851f1ab384ed0c3097ea8b6eb96b5c8daf2b213532c7dceb9c749ef6d4c71a628a)) {
        test_fail
 }
 
 &request -= &Tmp-Octets-0[*]
 &Tmp-Octets-0 = "%{base64decode:eHfXPKZ+2iv9cnMV1MOmE/moYYA1Uk5xTmw4aVlMYmtDYzdKaFI4YXM0VHRERENYNm90dXVXdGNqYThySVRVeXg5enJuSFNlOXRUSEdtS0s=}"
 
-if (&Tmp-Octets-0 != 0x7877d73ca67eda2bfd727315d4c3a613f9a8618035524e714e6c3869594c626b4363374a685238617334547444444358366f7475755774636a6138724954557978397a726e48536539745448476d4b4b) {
+if (!(&Tmp-Octets-0 == 0x7877d73ca67eda2bfd727315d4c3a613f9a8618035524e714e6c3869594c626b4363374a685238617334547444444358366f7475755774636a6138724954557978397a726e48536539745448476d4b4b)) {
        test_fail
 }
 success
index 62731948f4a1c0b6a4cf65c31e98603ffbd3afd1..f5ecb5ef09d011ee43980454d7a20868c8a97cff 100644 (file)
@@ -14,7 +14,7 @@ if (!(&NAS-IP-Address == &Framed-IP-Address)) {
 &NAS-IP-Address        := 0.0.0.0
 &Framed-IP-Address := 255.255.255.255
 
-if (!(&NAS-IP-Address != &Framed-IP-Address)) {
+if (!(!(&NAS-IP-Address == &Framed-IP-Address))) {
        test_fail
 }
 
index e45834ab78d5ed9ba0d405b58e975b1bc6bce134..1475115755d813bf032196b787e02885e40ec79a 100644 (file)
@@ -25,7 +25,7 @@ update { &Tmp-String-0 := 'candy' }   # Comment after unicorn block
        &Reply-Message = "I am #literally a comment #"
 }
 
-if (&Tmp-String-0 != 'candy') {
+if (!(&Tmp-String-0 == 'candy')) {
        test_fail
 }
 
index a5e4f76c831da8dec418a51870c1bfb686512494..368060000e17f592c28700f41d49f089fc0a1e99 100644 (file)
@@ -16,7 +16,7 @@ if (&Tmp-String-0 != "Fri 22 Sep 17:25:00 GMT 2017") && (&Tmp-String-0 != "Fri 2
 # Convert string to integer
 &Tmp-Integer-1 := %(integer:%(date:%{Tmp-String-0}))
 
-if (&Tmp-Integer-1 != &Tmp-Integer-0) {
+if (!(&Tmp-Integer-1 == &Tmp-Integer-0)) {
        test_fail
 }
 
@@ -24,7 +24,7 @@ if (&Tmp-Integer-1 != &Tmp-Integer-0) {
 &Tmp-String-0 := %(localdate:request)
 &Tmp-String-1 := "%S"
 
-if (&Tmp-String-0 != &Tmp-String-1) {
+if (!(&Tmp-String-0 == &Tmp-String-1)) {
        test_fail
 }
 
@@ -33,7 +33,7 @@ if (&Tmp-String-0 != &Tmp-String-1) {
 
 &Tmp-Integer-2 := %(integer:%(sqldate:%{Tmp-String-2}))
 
-if (&Tmp-Integer-2 != &Tmp-Integer-0) {
+if (!(&Tmp-Integer-2 == &Tmp-Integer-0)) {
        test_fail
 }
 
index 39d63e86f05ebcf5a0efe2cbf780a82cffda2b08..f0037a36fafa36c42e6c8932f67c6f3046f249c5 100644 (file)
@@ -5,27 +5,27 @@
 &Tmp-Integer-0 := "%(debug:4)"
 
 # Check debug level is now 4
-if ("%(debug:3)" != 4) {
+if (!("%(debug:3)" == 4)) {
        test_fail
 }
 
 # Call with NULL arg, should report current level
-if ("%(debug:%{Tmp-String-8})" != 3) {
+if (!("%(debug:%{Tmp-String-8})" == 3)) {
        test_fail
 }
 
 # ...and again
-if ("%(debug:%{Tmp-String-8})" != 3) {
+if (!("%(debug:%{Tmp-String-8})" == 3)) {
        test_fail
 }
 
 # ...and again
-if ("%(debug:)" != 3) {
+if (!("%(debug:)" == 3)) {
        test_fail
 }
 
 # ...and again
-if ("%(debug:)" != 3) {
+if (!("%(debug:)" == 3)) {
        test_fail
 }
 
index cfebd211f62979129d35a2043ec9a4b74b334c50..f31bd8f751f529fcec69ef2810c3e51db3cc7b4a 100644 (file)
@@ -9,12 +9,12 @@
 #
 &Tmp-Integer-0 += 5
 
-if (&Tmp-Integer-0 != 9) {
+if (!(&Tmp-Integer-0 == 9)) {
        test_fail
 }
 
 &Tmp-Integer-0 += &Tmp-Integer-1
-if (&Tmp-Integer-0 != 15) {
+if (!(&Tmp-Integer-0 == 15)) {
        test_fail
 }
 
index 050001cf4c228d82c0ab20d8b35ee7eb71578a0b..7323bfb097b273755879f0660cbcbf11c39707fd 100644 (file)
@@ -33,15 +33,15 @@ group {
        &Tmp-String-2 := "bar"
 }
 
-if (&Tmp-String-0 != "foo") {
+if (!(&Tmp-String-0 == "foo")) {
        test_fail
 }
 
-if (&Tmp-String-1 != "yup") {
+if (!(&Tmp-String-1 == "yup")) {
        test_fail
 }
 
-if (&Tmp-String-2 != "bar") {
+if (!(&Tmp-String-2 == "bar")) {
        test_fail
 }
 
index c64a2028b73fc1d68146cf52fbaf6e48c37f23ce..5fadc347561680d7457da003e3d1464daf361531 100644 (file)
@@ -13,7 +13,7 @@ if (!&reply.Tmp-String-0) {
 }
 
 # and have the correct value
-if (&reply.Tmp-String-0 != "foo") {
+if (!(&reply.Tmp-String-0 == "foo")) {
        test_fail
 }
 
index 2a64d98af56adf06bdf406d4d456bd89d28e0092..88485a18d206c463b241f6ba6908ac68dedd9b25 100644 (file)
@@ -6,11 +6,11 @@
 &Tmp-String-3 := { &Tmp-String-0, "bar", "%{Tmp-String-0}", %{Tmp-String-2} }
 
 
-if (%{Tmp-String-3[#]} != 4) {
+if (!(%{Tmp-String-3[#]} == 4)) {
        test_fail
 }
 
-if ("%{Tmp-String-3[*]}" != "foobarfooTmp-String-0") {
+if (!("%{Tmp-String-3[*]}" == "foobarfooTmp-String-0")) {
        test_fail
 }
 
index 617c05d82020911a0fade967363b50015b8d3aa9..143c300d533f7d1203d31da1383158b1035ad194 100644 (file)
@@ -8,23 +8,23 @@
        &User-Name
 }
 
-if (%{request.Tmp-String-0[#]} != 4) {
+if (!(%{request.Tmp-String-0[#]} == 4)) {
        test_fail
 }
 
-if (&Tmp-String-0[0] != "foo") {
+if (!(&Tmp-String-0[0] == "foo")) {
        test_fail
 }
 
-if (&Tmp-String-0[1] != "bar") {
+if (!(&Tmp-String-0[1] == "bar")) {
        test_fail
 }
 
-if (&Tmp-String-0[2] != "baz") {
+if (!(&Tmp-String-0[2] == "baz")) {
        test_fail
 }
 
-if (&Tmp-String-0[3] != "bob") {
+if (!(&Tmp-String-0[3] == "bob")) {
        test_fail
 }
 
index deb4ae06720f93c8d26c76192f93178271b0b9e8..e6b3d5704b46023e93a905429d6115126c099d3e 100644 (file)
@@ -8,7 +8,7 @@ if (!&Framed-IP-Address) {
        test_fail
 }
 
-if (&Framed-IP-Address != 127.0.0.1) {
+if (!(&Framed-IP-Address == 127.0.0.1)) {
        test_fail
 }
 
index e4664c11daf8886af25a36a75f135102f7585c91..02824ede659a28f93b4347aa4ec9205aa051c4a9 100644 (file)
@@ -9,7 +9,7 @@
 #  Do operations on sets of inputs.
 #
 &Tmp-Integer-1 += &Tmp-Integer-0[*]
-if (&Tmp-Integer-1 != 27) {
+if (!(&Tmp-Integer-1 == 27)) {
        test_fail
 }
 
@@ -24,7 +24,7 @@ if (&Tmp-Integer-1 != 27) {
 #  Do operations on sets of inputs.
 #
 &Tmp-Integer-1 += &Tmp-Integer-2[*]
-if (&Tmp-Integer-1 != 27) {
+if (!(&Tmp-Integer-1 == 27)) {
        test_fail
 }
 
index 997b89c301172cab1c8cdcb833b2a460849a38b3..3a499b93c0510a78f9d75e9aa28560a5ff3cab43 100644 (file)
@@ -36,7 +36,7 @@ if (!&Tmp-String-0[0]) {
 &control.Tmp-String-0 := { "a", "b", "c", "d" }
 
 &request += &control.Tmp-String-0[*]
-if (%{request.Tmp-String-0[#]} != 4) {
+if (!(%{request.Tmp-String-0[#]} == 4)) {
        test_fail
 }
 
index e6d03d8048271f7caa4007fb4fd9ffb380334bc2..710a9d4f22009deb6cb39cf38e85705092442b8d 100644 (file)
@@ -46,7 +46,7 @@ if (!&Tmp-String-0) {
 &request -= &Tmp-String-0[0]
 
 #  the first one has been removed
-if (&Tmp-String-0[0] != "bar") {
+if (!(&Tmp-String-0[0] == "bar")) {
        test_fail
 }
 
@@ -78,11 +78,11 @@ if (&Tmp-String-0) {
        &Tmp-String-0 == "bar"
 }
 
-if (&Tmp-String-0[0] != "foo") {
+if (!(&Tmp-String-0[0] == "foo")) {
        test_fail
 }
 
-if (&Tmp-String-0[1] != "baz") {
+if (!(&Tmp-String-0[1] == "baz")) {
        test_fail
 }
 
@@ -94,7 +94,7 @@ if (&Tmp-String-0[2]) {
 #  Remove via in-place list, too.
 #
 &request -= "Tmp-String-0 == 'foo'"
-if (&Tmp-String-0[0] != "baz") {
+if (!(&Tmp-String-0[0] == "baz")) {
        test_fail
 }
 
index 4b58fc1ef6cf0ac34d716b5abbb45849392924a5..3c90af0338ae27da331099b5259a762816e0ab4e 100644 (file)
@@ -8,7 +8,7 @@
 #  Do operations on sets of inputs.
 #
 &Tmp-Integer-1 += &Tmp-Group-0.Tmp-Integer-0[*]
-if (&Tmp-Integer-1 != 27) {
+if (!(&Tmp-Integer-1 == 27)) {
        test_fail
 }
 
@@ -16,7 +16,7 @@ if (&Tmp-Integer-1 != 27) {
 &Tmp-Integer-1 := 0
 
 &Tmp-Integer-1 += &Tmp-Group-1.Tmp-Integer-0[*]
-if (&Tmp-Integer-1 != 27) {
+if (!(&Tmp-Integer-1 == 27)) {
        test_fail
 }
 
index 36c2b40ce0ff060e9a936acb2e17088729309859..6e5140a3725c2c6835913c29875aacea317f8233 100644 (file)
@@ -10,7 +10,7 @@
 #
 &control += "Tmp-Integer-0 = 9"
 
-if (&control.Tmp-Integer-0 != 9) {
+if (!(&control.Tmp-Integer-0 == 9)) {
        test_fail
 }
 
index ce70c4a9bc4097e9e052779ce4a31e7d851bc90c..7e7ef40e44c738866739b6f0ec9b41c9d3350e7b 100644 (file)
@@ -17,7 +17,7 @@ if (!&control.Tmp-Group-0.Tmp-Integer-0) {
        test_fail
 }
 
-if (&control.Tmp-Group-0.Tmp-Integer-0 != 1) {
+if (!(&control.Tmp-Group-0.Tmp-Integer-0 == 1)) {
        test_fail
 }
 
@@ -26,7 +26,7 @@ if (&control.Tmp-Group-0.Tmp-Integer-0 != 1) {
 #
 &control.Tmp-Group-0.Tmp-Integer-0 += 5
 
-if (&control.Tmp-Group-0.Tmp-Integer-0 != 6) {
+if (!(&control.Tmp-Group-0.Tmp-Integer-0 == 6)) {
        test_fail
 }
 
@@ -52,7 +52,7 @@ if (&control.Tmp-Group-0.Tmp-Integer-0) {
        &Tmp-IP-Address-0 = 127.0.0.1
 }
 
-if (&control.Tmp-Group-0.Tmp-IP-Address-0 != 127.0.0.1) {
+if (!(&control.Tmp-Group-0.Tmp-IP-Address-0 == 127.0.0.1)) {
        test_fail
 }
 
@@ -63,11 +63,11 @@ if (&control.Tmp-Group-0.Tmp-IP-Address-0 != 127.0.0.1) {
        &Tmp-Octets-0 = 0xabcdef
 }
 
-if (&control.Tmp-Group-0.Tmp-IP-Address-0 != 127.0.0.1) {
+if (!(&control.Tmp-Group-0.Tmp-IP-Address-0 == 127.0.0.1)) {
        test_fail
 }
 
-if (&control.Tmp-Group-0.Tmp-Octets-0 != 0xabcdef) {
+if (!(&control.Tmp-Group-0.Tmp-Octets-0 == 0xabcdef)) {
        test_fail
 }
 
index e93921b67659854183660a9605b428f1900c2ebc..fc6661452304e01d5f5cb01410e253ff47c3fc03 100644 (file)
@@ -4,14 +4,14 @@
 &Tmp-String-0 := "foo"
 &Tmp-String-0 ^= "bar"
 
-if (&Tmp-String-0 != "barfoo") {
+if (!(&Tmp-String-0 == "barfoo")) {
        test_fail
 }
 
 &Tmp-String-0 := "foo"
 &Tmp-String-0 += "bar"
 
-if (&Tmp-String-0 != "foobar") {
+if (!(&Tmp-String-0 == "foobar")) {
        test_fail
 }
 
@@ -20,7 +20,7 @@ if (&Tmp-String-0 != "foobar") {
 #
 &Tmp-String-0 -= "bar"
 
-if (&Tmp-String-0 != "foo") {
+if (!(&Tmp-String-0 == "foo")) {
        test_fail
 }
 
index e2fc655c864cbe1dbd60c4d25226845f519f9d3c..9f29053ebd2ef9d6e08bb699e81a02cf3cdfc899 100644 (file)
@@ -19,12 +19,12 @@ if (!&Tmp-String-0) {
 }
 
 # The original value should be unchanged
-if (&Tmp-String-0[0] != "foo") {
+if (!(&Tmp-String-0[0] == "foo")) {
        test_fail
 }
 
 #  and the new value should be there, too
-if (&Tmp-String-0[1] != "bar") {
+if (!(&Tmp-String-0[1] == "bar")) {
        test_fail
 }
 
index a18246e7e6ca7786a6daa6ef9c76b9dcd91380fc..8af127cd3392c35de568cfcbd312168c5263c5e8 100644 (file)
 # = not followed by hex and without 2 following chars
 &Tmp-String-8 := 'a=Az=y'
 
-if (<string>"%{escape:%{Tmp-String-0}}" != &Tmp-String-0) {
+if (!(<string>"%{escape:%{Tmp-String-0}}" == &Tmp-String-0)) {
        test_fail
 }
 
-if (<string>"%{escape:%{Tmp-String-1}}" != &Tmp-String-3) {
+if (!(<string>"%{escape:%{Tmp-String-1}}" == &Tmp-String-3)) {
        test_fail
 }
 
-if (<string>"%{escape:%{Tmp-String-2}}" != &Tmp-String-4) {
+if (!(<string>"%{escape:%{Tmp-String-2}}" == &Tmp-String-4)) {
        test_fail
 }
 
-if (<string>"%{unescape:%{Tmp-String-0}}" != &Tmp-String-0) {
+if (!(<string>"%{unescape:%{Tmp-String-0}}" == &Tmp-String-0)) {
        test_fail
 }
 
-if (<string>"%{unescape:%{Tmp-String-3}}" != "%{Tmp-String-1}") {
+if (!(<string>"%{unescape:%{Tmp-String-3}}" == "%{Tmp-String-1}")) {
        test_fail
 }
 
-if (<string>"%{unescape:%{Tmp-String-4}}" != &Tmp-String-2) {
+if (!(<string>"%{unescape:%{Tmp-String-4}}" == &Tmp-String-2)) {
        test_fail
 }
 
-if (<string>"%{escape:%{Tmp-String-6}}" != &Tmp-String-7) {
+if (!(<string>"%{escape:%{Tmp-String-6}}" == &Tmp-String-7)) {
        test_fail
 }
 
-if (<string>"%{unescape:%{Tmp-String-7}}" != &Tmp-String-6) {
+if (!(<string>"%{unescape:%{Tmp-String-7}}" == &Tmp-String-6)) {
        test_fail
 }
 
-if (<string>"%{unescape:%{Tmp-String-8}}" != &Tmp-String-8) {
+if (!(<string>"%{unescape:%{Tmp-String-8}}" == &Tmp-String-8)) {
        test_fail
 }
 
index d28fbc0674728cd6e6e74d5fae72ad315a8f4c3f..a0378245d7728fc2c68f29a82d025abfd460f6e6 100644 (file)
 }
 
 
-if ("%(length:%{Tmp-String-0})" != 39) {
+if (!("%(length:%{Tmp-String-0})" == 39)) {
        test_fail
 }
 
-if ("%(length:%{Tmp-String-1})" != 42) {
+if (!("%(length:%{Tmp-String-1})" == 42)) {
        test_fail
 }
 
@@ -37,7 +37,7 @@ if (&Tmp-String-0 != "i have scary embedded things\000 inside me") {
 }
 
 &Tmp-String-8 := "%{string:%{Tmp-Octets-1}}"
-if (&Tmp-String-8 != "0x01\0010x07\0070x0A\n0x0D\r\"\"0xb0\260°") {
+if (!(&Tmp-String-8 == "0x01\0010x07\0070x0A\n0x0D\r\"\"0xb0\260°")) {
        test_fail
 }
 
@@ -45,7 +45,7 @@ if ("%{Tmp-String-0[0]}" != "i have scary embedded things\000 inside me") {
        test_fail
 }
 
-if ("%{Tmp-String-0[1]}" != "0x01\0010x07\0070x0A\n0x0D\r\"\"0xb0\260°") {
+if (!("%{Tmp-String-0[1]}" == "0x01\0010x07\0070x0A\n0x0D\r\"\"0xb0\260°")) {
        test_fail
 }
 
@@ -54,7 +54,7 @@ if ("%{Tmp-String-0[*]}" != "i have scary embedded things\000 inside me0x01\0010
        test_fail
 }
 
-if (&Tmp-String-0[0] != &Tmp-String-0[0]) {
+if (!(&Tmp-String-0[0] == &Tmp-String-0[0])) {
        test_fail
 }
 
@@ -62,14 +62,14 @@ if (&Tmp-String-0[0] != &Tmp-String-0[0]) {
 #  This seems weird... double escapes for most things, but single escapes
 #  for the quotation marks.
 #
-if ("%{Tmp-String-2[1]}" != "0x01\0010x07\0070x0A\n0x0D\r''0xb0\260°") {
+if (!("%{Tmp-String-2[1]}" == "0x01\0010x07\0070x0A\n0x0D\r''0xb0\260°")) {
        test_fail
 }
 
 #
 # And again as an attribute reference
 #
-if (&Tmp-String-2[1] != "0x01\0010x07\0070x0A\n0x0D\r''0xb0\260°") {
+if (!(&Tmp-String-2[1] == "0x01\0010x07\0070x0A\n0x0D\r''0xb0\260°")) {
        test_fail
 }
 
@@ -77,7 +77,7 @@ if (&Tmp-String-2[1] != "0x01\0010x07\0070x0A\n0x0D\r''0xb0\260°") {
 #  Other data types
 #
 &Tmp-String-0 := "%{string:&Tmp-IP-Address-0}"
-if ("%(length:%{Tmp-String-0})" != 17) {
+if (!("%(length:%{Tmp-String-0})" == 17)) {
        test_fail
 }
 
index 3585db11007211e8d0f33fbadccdd0063cf6973e..c09bbc716d6de585b57c7dcc97f9ed06089921fd 100644 (file)
@@ -4,11 +4,11 @@
        &Tmp-Octets-0 = 0x001122334456,
 }
 
-if (&Tmp-Ethernet-0[0] != 00:11:22:33:44:54) {
+if (!(&Tmp-Ethernet-0[0] == 00:11:22:33:44:54)) {
        test_fail
 }
 
-if (&Tmp-Ethernet-0[1] != 00:11:22:33:44:55) {
+if (!(&Tmp-Ethernet-0[1] == 00:11:22:33:44:55)) {
        test_fail
 }
 
@@ -16,7 +16,7 @@ if (&Tmp-Ethernet-0[1] != 00:11:22:33:44:55) {
        &Tmp-Ethernet-0 = &Tmp-Octets-0[0]
 }
 
-if (&Tmp-Ethernet-0[2] != 00:11:22:33:44:56) {
+if (!(&Tmp-Ethernet-0[2] == 00:11:22:33:44:56)) {
        test_fail
 }
 
@@ -26,7 +26,7 @@ if (&Tmp-Ethernet-0[2] != 00:11:22:33:44:56) {
        &Tmp-Ethernet-0 = %{Tmp-Ethernet-1[42]}
 }
 
-if (%{request.Tmp-Ethernet-0[#]} != 3) {
+if (!(%{request.Tmp-Ethernet-0[#]} == 3)) {
        test_fail
 }
 
index e39c1ed0c436cd68115eb35dc4c12b151c5440af..e065708ea63e1d74bfda1d7a610f5d163dc23bf8 100644 (file)
@@ -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
 }
 
index 25962d8500fb6365cee6d6676717dd83b47ec2ee..3e312c9a1bb81674839879c01776916037a783e1 100644 (file)
@@ -14,7 +14,7 @@ if (&User-Name) {
        }
 }
 
-if (&control.Tmp-String-1 != 'ssid=GHIJKL') {
+if (!(&control.Tmp-String-1 == 'ssid=GHIJKL')) {
        test_fail
 }
 
@@ -26,7 +26,7 @@ foreach &control.Tmp-String-0 {
        }
 }
 
-if (&control.Tmp-String-1 != 'ssid=GHIJKL') {
+if (!(&control.Tmp-String-1 == 'ssid=GHIJKL')) {
        test_fail
 }
 
index 995afd0f0b5b78adbadb7bae8420ea6b6bb7524d..406540985e773e07e26402b24a4702050e9aa157 100644 (file)
@@ -28,42 +28,42 @@ ok  # break up edit sections
 }
 
 # String
-if (&Tmp-String-1[0] != '39383730') {
+if (!(&Tmp-String-1[0] == '39383730')) {
        test_fail
 }
 
 # Octets
-if (&Tmp-String-1[1] != '39383731') {
+if (!(&Tmp-String-1[1] == '39383731')) {
        test_fail
 }
 
 # IP Address
-if (&Tmp-String-1[2] != '39383732') {
+if (!(&Tmp-String-1[2] == '39383732')) {
        test_fail
 }
 
 # Integer
-if (&Tmp-String-1[3] != '39383734') {
+if (!(&Tmp-String-1[3] == '39383734')) {
        test_fail
 }
 
 # ifid
-if (&Tmp-String-1[4] != '0000000039383737') {
+if (!(&Tmp-String-1[4] == '0000000039383737')) {
        test_fail
 }
 
 # ipv6addr
-if (&Tmp-String-1[5] != '00000000000000000000000039383738') {
+if (!(&Tmp-String-1[5] == '00000000000000000000000039383738')) {
        test_fail
 }
 
 # ipv6addrprefix
-if (&Tmp-String-1[6] != '008000000000000000000000000039383739') {
+if (!(&Tmp-String-1[6] == '008000000000000000000000000039383739')) {
        test_fail
 }
 
 # byte
-if (&Tmp-String-1[7] != '3a') {
+if (!(&Tmp-String-1[7] == '3a')) {
        test_fail
 }
 
@@ -75,22 +75,22 @@ if (&Tmp-String-1[7] != '3a') {
 }
 
 # short
-if (&Tmp-String-1[0] != '373b') {
+if (!(&Tmp-String-1[0] == '373b')) {
        test_fail
 }
 
 # ethernet
-if (&Tmp-String-1[1] != '00003938373c') {
+if (!(&Tmp-String-1[1] == '00003938373c')) {
        test_fail
 }
 
 # integer64
-if (&Tmp-String-1[2] != '100000003938373d') {
+if (!(&Tmp-String-1[2] == '100000003938373d')) {
        test_fail
 }
 
 # ipv4prefix
-if (&Tmp-String-1[3] != '203938373e') {
+if (!(&Tmp-String-1[3] == '203938373e')) {
        test_fail
 }
 
index 7bebd97e479519a5e31d8b9ca6e546615ba41cff..cf47999d5f0ed480da8289f1823f6261c91fad1c 100644 (file)
@@ -6,6 +6,6 @@ if (&User-Name == "bob") {
        success
 }
 
-if (&User-Name != "bob") {
+if (!(&User-Name == "bob")) {
        test_fail
 }
index 414ca6f46aba5d13a857eef78a4385415b2aff60..9717280faf7123e752b134e7a11cb7914279d9c9 100644 (file)
@@ -3,7 +3,7 @@
 #
 #  Matching "if" conditions
 #
-if (&User-Name != "bob") {
+if (!(&User-Name == "bob")) {
        test_fail
 }
 else {
index e082a52b966a9217bc6a95e23cfcd970c025257a..76dfed61405ae585c5b442e85f2c88d9df927bf3 100644 (file)
@@ -2,7 +2,7 @@
 #
 #  Matching "if" conditions
 #
-if (&User-Name != "bob") {
+if (!(&User-Name == "bob")) {
        test_fail
 }
 elsif (&User-Name == "bob") {
index f7311e007026671cb17c6035ab09b26d543cc0b9..db3852f1308e3572e545fd1a758129c7511712fd 100644 (file)
@@ -47,7 +47,7 @@
 #
 #  Mmmm O(N^2)
 #
-if (&Tmp-String-0[*] != &control.Tmp-String-0[*]) {
+if (!(&Tmp-String-0[*] == &control.Tmp-String-0[*])) {
        test_fail
 }
 
@@ -62,7 +62,7 @@ if (&Tmp-String-1[*] == &control.Tmp-String-0[*]) {
 #
 #  Integer comparison and normalisation
 #
-if (&Tmp-Integer-0 != &control.Tmp-Integer-0) {
+if (!(&Tmp-Integer-0 == &control.Tmp-Integer-0)) {
        test_fail
 }
 
@@ -111,14 +111,14 @@ if (&Tmp-String-1 =~ /%{Tmp-String-2[#]}$/) {
 #
 #  XLAT virtual comparisons
 #
-if (&control.Tmp-Integer-0[*] != "%{control.Tmp-Integer-0[#]}") {
+if (!(&control.Tmp-Integer-0[*] == "%{control.Tmp-Integer-0[#]}")) {
        test_fail
 }
 
 #
 #  Literal comparisons
 #
-if (&control.Tmp-String-1[*] != 'boink') {
+if (!(&control.Tmp-String-1[*] == 'boink')) {
        test_fail
 }
 
index 80c58f3e0a437b10c8e338512186d576078bfaf5..102a09514bb44e5e4873951271607ecf6901b7a0 100644 (file)
@@ -42,7 +42,7 @@ if (!&control.Tmp-String-1) {
        test_fail
 }
 
-if (&control.Tmp-String-1 != "") {
+if (!(&control.Tmp-String-1 == "")) {
        test_fail
 }
 
index e9c4336b090f23c5474bdfd053324b514f6a1cc2..ff135575d6c7f6568b8052ca7ee225f93715d2cb 100644 (file)
@@ -23,7 +23,7 @@ else {
 
 # Checking capture groups are cleared out correctly
 if (&User-Name =~ /^([0-9])_%{Tmp-String-0}/) {
-       if ("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}" != '1_1') {
+       if (!("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}" == '1_1')) {
                test_fail
        }
 }
@@ -33,7 +33,7 @@ else {
 
 # Checking capture groups are cleared out correctly when there are no matches
 if (&User-Name =~ /^.%{Tmp-String-0}/) {
-       if ("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}" != '1') {
+       if (!("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}" == '1')) {
                test_fail
        }
 }
@@ -43,7 +43,7 @@ else {
 
 # Checking full capture group range
 if ('a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_D_E_F' =~ /^(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)$/) {
-       if ("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}%{8}%{9}%{10}%{11}%{12}%{13}%{14}%{15}%{16}%{17}%{18}%{19}%{20}%{21}%{22}%{23}%{24}%{25}%{26}%{27}%{28}%{29}%{30}%{31}%{32}" != 'a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_D_E_FabcdefghijklmnopqrstuvwxyzABCDEF') {
+       if (!("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}%{8}%{9}%{10}%{11}%{12}%{13}%{14}%{15}%{16}%{17}%{18}%{19}%{20}%{21}%{22}%{23}%{24}%{25}%{26}%{27}%{28}%{29}%{30}%{31}%{32}" == 'a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_D_E_FabcdefghijklmnopqrstuvwxyzABCDEF')) {
                test_fail
        }
 }
@@ -53,7 +53,7 @@ else {
 
 # Checking full capture group overun
 if ('a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_D_E_F_G' =~ /^(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)$/) {
-       if ("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}%{8}%{9}%{10}%{11}%{12}%{13}%{14}%{15}%{16}%{17}%{18}%{19}%{20}%{21}%{22}%{23}%{24}%{25}%{26}%{27}%{28}%{29}%{30}%{31}%{32}" != 'a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_D_E_F_GabcdefghijklmnopqrstuvwxyzABCDEF') {
+       if (!("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}%{8}%{9}%{10}%{11}%{12}%{13}%{14}%{15}%{16}%{17}%{18}%{19}%{20}%{21}%{22}%{23}%{24}%{25}%{26}%{27}%{28}%{29}%{30}%{31}%{32}" == 'a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_D_E_F_GabcdefghijklmnopqrstuvwxyzABCDEF')) {
                test_fail
        }
 }
index 8f1f64585a3eeede149ef5326e9d26f9a4e9fc22..4c147242d939d3460fb21a22470fab16a3e46765 100644 (file)
@@ -22,7 +22,7 @@ else {
 
 # Checking capture groups are cleared out correctly
 if (&User-Name =~ /^([0-9])_/) {
-       if ("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}" != '1_1') {
+       if (!("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}" == '1_1')) {
                test_fail
        }
 }
@@ -32,7 +32,7 @@ else {
 
 # Checking capture groups are cleared out correctly when there are no matches
 if (&User-Name =~ /^./) {
-       if ("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}" != '1') {
+       if (!("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}" == '1')) {
                test_fail
        }
 }
index b270633d396afe7a0f414a7a910b4051917a90d3..9adb9a6594f955f90b94b58a0173c1744fbc7dbf 100644 (file)
@@ -42,7 +42,7 @@ if (&Module-Failure-Message != "No previous numbered regex capture group") {
 # uncompiled - ref - named capture groups
 if (&User-Name =~ /^(?<one>[0-9])_(?<two>[0-9])?_(?<three>[0-9]*)_(?<four>[0-9]+)_(?<five>[^_])_(?<six>6)_(?<seven>[7-8])%{Tmp-String-1}/) {
        &Tmp-String-0 := "%{regex:seven}_%{regex:six}_%{regex:five}_%{regex:four}_%{regex:three}_%{regex:two}_%{regex:one}_%{0}"
-       if (&Tmp-String-0 != '7_6_5_4_3_2_1_1_2_3_4_5_6_7') {
+       if (!(&Tmp-String-0 == '7_6_5_4_3_2_1_1_2_3_4_5_6_7')) {
                test_fail
        }
 }
@@ -53,7 +53,7 @@ else {
 # Checking capture groups are cleared out correctly
 if (&User-Name =~ /^(?<one>[0-9])_%{Tmp-String-1}/) {
        &Tmp-String-0 := "%{0}%{regex:one}%{regex:two}%{regex:three}%{regex:four}%{regex:five}%{regex:six}%{regex:seven}"
-       if (&Tmp-String-0 != '1_1') {
+       if (!(&Tmp-String-0 == '1_1')) {
                test_fail
        }
 }
@@ -64,7 +64,7 @@ else {
 # Checking capture groups are cleared out correctly when there are no matches
 if (&User-Name =~ /^.%{Tmp-String-1}/) {
        &Tmp-String-0 := "%{0}%{regex:one}%{regex:two}%{regex:three}%{regex:four}%{regex:five}%{regex:six}%{regex:seven}"
-       if (&Tmp-String-0 != '1') {
+       if (!(&Tmp-String-0 == '1')) {
                test_fail
        }
 }
@@ -75,7 +75,7 @@ else {
 # compiled - ref - named capture groups
 if (&User-Name =~ /^(?<one>[0-9])_(?<two>[0-9])?_(?<three>[0-9]*)_(?<four>[0-9]+)_(?<five>[^_])_(?<six>6)_(?<seven>[7-8])/) {
        &Tmp-String-0 := "%{regex:seven}_%{regex:six}_%{regex:five}_%{regex:four}_%{regex:three}_%{regex:two}_%{regex:one}_%{0}"
-       if (&Tmp-String-0 != '7_6_5_4_3_2_1_1_2_3_4_5_6_7') {
+       if (!(&Tmp-String-0 == '7_6_5_4_3_2_1_1_2_3_4_5_6_7')) {
                test_fail
        }
 }
@@ -86,7 +86,7 @@ else {
 # compiled - xlat - named capture groups
 if ('1_2_3_4_5_6_7' =~ /^(?<one>[0-9])_(?<two>[0-9])?_(?<three>[0-9]*)_(?<four>[0-9]+)_(?<five>[^_])_(?<six>6)_(?<seven>[7-8])/) {
        &Tmp-String-0 := "%{regex:seven}_%{regex:six}_%{regex:five}_%{regex:four}_%{regex:three}_%{regex:two}_%{regex:one}_%{0}"
-       if (&Tmp-String-0 != '7_6_5_4_3_2_1_1_2_3_4_5_6_7') {
+       if (!(&Tmp-String-0 == '7_6_5_4_3_2_1_1_2_3_4_5_6_7')) {
                test_fail
        }
 }
@@ -97,7 +97,7 @@ else {
 # compiled - ref - named capture groups (numeric indexes)
 if (&User-Name =~ /^(?<one>[0-9])_(?<two>[0-9])?_(?<three>[0-9]*)_(?<four>[0-9]+)_(?<five>[^_])_(?<six>6)_(?<seven>[7-8])/) {
        &Tmp-String-0 := "%{7}_%{6}_%{5}_%{4}_%{3}_%{2}_%{1}_%{0}"
-       if (&Tmp-String-0 != '7_6_5_4_3_2_1_1_2_3_4_5_6_7') {
+       if (!(&Tmp-String-0 == '7_6_5_4_3_2_1_1_2_3_4_5_6_7')) {
                test_fail
        }
 
@@ -118,7 +118,7 @@ if (&User-Name =~ /^(?<one>[0-9])_(?<two>[0-9])?_(?<three>[0-9]*)_(?<four>[0-9]+
        &Tmp-Integer-7 := 7
 
        &Tmp-String-0 := "%{regex:%{Tmp-Integer-7}}_%{regex:%{Tmp-Integer-6}}_%{regex:%{Tmp-Integer-5}}_%{regex:%{Tmp-Integer-4}}_%{regex:%{Tmp-Integer-3}}_%{regex:%{Tmp-Integer-2}}_%{regex:%{Tmp-Integer-1}}_%{regex:%{Tmp-Integer-0}}"
-       if (&Tmp-String-0 != '7_6_5_4_3_2_1_1_2_3_4_5_6_7') {
+       if (!(&Tmp-String-0 == '7_6_5_4_3_2_1_1_2_3_4_5_6_7')) {
                test_fail
        }
 }
index 3a08820b274e5ad056b2999a8933ac5e752ca7a3..75525fd51be8bcfdabb96368a72659c16daa46a3 100644 (file)
@@ -9,7 +9,7 @@ update request {
 }
 
 if (&Vendor-Specific.Cisco.AVPair[1] =~ /bar=(.*)/) {
-       if ("%{1}" != 'baz') {
+       if (!("%{1}" == 'baz')) {
                test_fail
        }
 }
@@ -18,7 +18,7 @@ else {
 }
 
 if (&Vendor-Specific.Cisco.AVPair[*] =~ /bar=(.*)/) {
-       if ("%{1}" != 'baz') {
+       if (!("%{1}" == 'baz')) {
                test_fail
        }
 }
index 697676d979544de79e4a865824904a7cba3d7209..4cb7a10a102d583264be35b568d3467b42148f60 100644 (file)
        &Tmp-IP-Address-3 = 2130706436
 }
 
-if (&NAS-IP-Address != 127.0.0.1) {
+if (!(&NAS-IP-Address == 127.0.0.1)) {
        test_fail
 }
 
-if (&Tmp-IP-Address-0 != 127.0.0.1) {
+if (!(&Tmp-IP-Address-0 == 127.0.0.1)) {
        test_fail
 }
 
-if (&Tmp-IP-Address-1 != 127.0.0.2) {
+if (!(&Tmp-IP-Address-1 == 127.0.0.2)) {
        test_fail
 }
 
-if (&Tmp-IP-Address-2 != 127.0.0.3) {
+if (!(&Tmp-IP-Address-2 == 127.0.0.3)) {
        test_fail
 }
 
-if (&Tmp-IP-Address-3 != 127.0.0.4) {
+if (!(&Tmp-IP-Address-3 == 127.0.0.4)) {
        test_fail
 }
 
index b732bdbe2b47d80b7883ccab91c4be3f14aeb396..e2c037253007034dc9f4f09c4fb6d137d5cc681b 100644 (file)
@@ -10,7 +10,7 @@
 if (!&raw.4) {
        test_fail
 }
-elsif (&raw.4 != 0x010203) {
+elsif (!(&raw.4 == 0x010203)) {
        test_fail
 }
 
index df5c34e38fd5ff5d5fc1f16cade75c45682b6ade..402ee6e2a031be6226b1c769d2bf30c893e345b9 100644 (file)
@@ -7,19 +7,19 @@
        &Framed-IP-Address = 198.51.0.1
 }
 
-if (&control.Tmp-Cast-IPv6Prefix != '::198.51.0.0/112') {
+if (!(&control.Tmp-Cast-IPv6Prefix == '::198.51.0.0/112')) {
        test_fail
 }
 
-if (&control.Tmp-Cast-IPv4Prefix != '198.51.0.0/16') {
+if (!(&control.Tmp-Cast-IPv4Prefix == '198.51.0.0/16')) {
        test_fail
 }
 
-if (&control.Tmp-Cast-IPv6Prefix != ::198.51.0.0/112) {
+if (!(&control.Tmp-Cast-IPv6Prefix == ::198.51.0.0/112)) {
        test_fail
 }
 
-if (&control.Tmp-Cast-IPv4Prefix != 198.51.0.0/16) {
+if (!(&control.Tmp-Cast-IPv4Prefix == 198.51.0.0/16)) {
        test_fail
 }
 
index dff5a1f60e815de2b320bf289d0b0e22f913a3cb..5f911f32593d258dbfa279da72d3be9252cac507 100644 (file)
@@ -20,7 +20,7 @@ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
        &Tmp-Cast-IPv4Prefix = 57.56.55.62/32
 }
 
-if (%(length:%{Tmp-String-0}) != 260) {
+if (!(%(length:%{Tmp-String-0}) == 260)) {
        test_fail
 }
 
@@ -37,47 +37,47 @@ if (%(length:%{Tmp-String-0}) != 260) {
 }
 
 # String - bin 0x39383730
-if (&Tmp-uint64-0 != 4) {
+if (!(&Tmp-uint64-0 == 4)) {
        test_fail
 }
 
 # Octets - bin 0x39383731
-if (&Tmp-Integer-1 != 4) {
+if (!(&Tmp-Integer-1 == 4)) {
        test_fail
 }
 
 # IP Address - bin 0x39383732
-if (&Tmp-Integer-2 != 4) {
+if (!(&Tmp-Integer-2 == 4)) {
        test_fail
 }
 
 # String - "hello, world"
-if (&Tmp-Integer-3 != 12) {
+if (!(&Tmp-Integer-3 == 12)) {
        test_fail
 }
 
 # Integer - bin 0x39383734
-if (&Tmp-Integer-4 != 4) {
+if (!(&Tmp-Integer-4 == 4)) {
        test_fail
 }
 
 # ifid - bin 0x0000000039383737
-if (&Tmp-Integer-6 != 8) {
+if (!(&Tmp-Integer-6 == 8)) {
        test_fail
 }
 
 # ipv6addr - bin 0x00000000000000000000000039383738
-if (&Tmp-Integer-7 != 16) {
+if (!(&Tmp-Integer-7 == 16)) {
        test_fail
 }
 
 # ipv6addrprefix - bin 0x8000000000000000000000000039383739
-if (&Tmp-Integer-8 != 17) {
+if (!(&Tmp-Integer-8 == 17)) {
        test_fail
 }
 
 # byte - bin 0x3a
-if (&Tmp-Integer-9 != 1) {
+if (!(&Tmp-Integer-9 == 1)) {
        test_fail
 }
 
@@ -87,22 +87,22 @@ if (&Tmp-Integer-9 != 1) {
 &Tmp-Integer-3 := "%(length:%{Tmp-Cast-IPv4Prefix})"
 
 # short - bin 0x373b
-if (&Tmp-Integer-0 != 2) {
+if (!(&Tmp-Integer-0 == 2)) {
        test_fail
 }
 
 # ethernet - bin 0x00003938373c
-if (&Tmp-Integer-1 != 6) {
+if (!(&Tmp-Integer-1 == 6)) {
        test_fail
 }
 
 # integer64 - bin 0x100000003938373d
-if (&Tmp-Integer-2 != 8) {
+if (!(&Tmp-Integer-2 == 8)) {
        test_fail
 }
 
 # ipv4prefix - bin 0x203938373e
-if (&Tmp-Integer-3 != 5) {
+if (!(&Tmp-Integer-3 == 5)) {
        test_fail
 }
 
index b83755737e8aa4941324767072693c719a8b4090..34d41a5e7428b6d7f3a79b1a1fafcf8d63c6a699 100644 (file)
@@ -8,15 +8,15 @@ map csv &User-Name {
        &control.Tmp-String-0 ^= 'field3'
 }
 
-if ("%{control.Tmp-String-0[0]}" != 'success') {
+if (!("%{control.Tmp-String-0[0]}" == 'success')) {
        test_fail
 }
 
-if ("%{control.Tmp-String-0[1]}" != "fail") {
+if (!("%{control.Tmp-String-0[1]}" == "fail")) {
        test_fail
 }
 
-if ("%{control.Tmp-String-0[#]}" != 2) {
+if (!("%{control.Tmp-String-0[#]}" == 2)) {
        test_fail
 }
 
index 126db42f325e34a25118d143afd969249fbca890..eb02eee7d418ea27c2a17a876b7677ff2ed9e781 100644 (file)
@@ -9,25 +9,25 @@
        &Tmp-String-1 = "request.Vendor-Specific.Nokia-SR.MSAP-Interface += 'UNICAST_7360OLT4'"
 }
 
-if ("%{map:%{Tmp-String-0}}" != 1) {
+if (!("%{map:%{Tmp-String-0}}" == 1)) {
        test_fail
 }
 
-if (&control.Tmp-String-0 != 'testing123') {
+if (!(&control.Tmp-String-0 == 'testing123')) {
        test_fail
 }
 
 foreach &Tmp-String-1[*] {
-       if ("%{map:%{Foreach-Variable-0}}" != 1) {
+       if (!("%{map:%{Foreach-Variable-0}}" == 1)) {
                test_fail
        }
 }
 
-if (&Vendor-Specific.Nokia-SR.MSAP-Interface[0] != 'UNICAST_7360OLT3') {
+if (!(&Vendor-Specific.Nokia-SR.MSAP-Interface[0] == 'UNICAST_7360OLT3')) {
        test_fail
 }
 
-if (&Vendor-Specific.Nokia-SR.MSAP-Interface[1] != 'UNICAST_7360OLT4') {
+if (!(&Vendor-Specific.Nokia-SR.MSAP-Interface[1] == 'UNICAST_7360OLT4')) {
        test_fail
 }
 
index e2f4242601d702bb8dc63e3148e25ac22ef47ddc..01e51856d8761c9cb5f04acc3b54571a05d3d073 100644 (file)
@@ -5,7 +5,7 @@
 #
 &Tmp-String-0 := "request.Tmp-Group-0.Tmp-String-1 = 'testing123'"
 
-if ("%{map:%{Tmp-String-0}}" != 1) {
+if (!("%{map:%{Tmp-String-0}}" == 1)) {
        test_fail
 }
 
index 9d23ad17f1487f59cf1e7a36e4739344d6687356..865078fb5211295676136887e441527f316e8765 100644 (file)
@@ -5,11 +5,11 @@
 #
 &Tmp-String-0 := "request.Tmp-Group-0.Tmp-String-0 := 'testing123'"
 
-if ("%{map:%{Tmp-String-0}}" != 1) {
+if (!("%{map:%{Tmp-String-0}}" == 1)) {
        test_fail
 }
 
-if ("%{map:%{Tmp-String-0}}" != 1) {
+if (!("%{map:%{Tmp-String-0}}" == 1)) {
        test_fail
 }
 
@@ -17,11 +17,11 @@ if ("%{map:request.Tmp-Group-0.Tmp-String-1 := 'testing000'}" != 1) {
        test_fail
 }
 
-if (!&Tmp-Group-0[0].Tmp-String-0 || (&Tmp-Group-0[0].Tmp-String-0 != 'testing123')) {
+if (!&Tmp-Group-0[0].Tmp-String-0 || (!(&Tmp-Group-0[0].Tmp-String-0 == 'testing123'))) {
        test_fail
 }
 
-if (!&Tmp-Group-0[0].Tmp-String-1 || (&Tmp-Group-0[0].Tmp-String-1 != 'testing000')) {
+if (!&Tmp-Group-0[0].Tmp-String-1 || (!(&Tmp-Group-0[0].Tmp-String-1 == 'testing000'))) {
        test_fail
 }
 
index 664f3781cb38dd042b4492e706f929ec80b00c53..f2725470a2287f19de16231e1eafff824cc5c129 100644 (file)
@@ -6,7 +6,7 @@
 #
 &Tmp-String-0 := "IA-PD.IAID = 11"
 
-if ("%{map:%{Tmp-String-0}}" != 1) {
+if (!("%{map:%{Tmp-String-0}}" == 1)) {
        test_fail
 }
 
@@ -14,7 +14,7 @@ if (!&IA-PD.IAID) {
        test_fail
 }
 
-if (&IA-PD.IAID != 11) {
+if (!(&IA-PD.IAID == 11)) {
        test_fail
 }
 
index 30636ab334197dbfaefc8b9fcb7d8e884015f8be..4f918e04bee6af27fe345d1ecaaf1145a1c7709f 100644 (file)
 #  Put "This is a string" into a file and call "md4sum" on it.
 #  You should get this string.
 #
-if (&Tmp-Octets-1 != 0x1f60d5cd85e17bfbdda7c923822f060c) {
+if (!(&Tmp-Octets-1 == 0x1f60d5cd85e17bfbdda7c923822f060c)) {
        test_fail
 }
 
-if (&Tmp-Octets-2 != 0x1f60d5cd85e17bfbdda7c923822f060c) {
+if (!(&Tmp-Octets-2 == 0x1f60d5cd85e17bfbdda7c923822f060c)) {
        test_fail
 }
 
-if (&Tmp-Octets-3 != 0x1f60d5cd85e17bfbdda7c923822f060c) {
+if (!(&Tmp-Octets-3 == 0x1f60d5cd85e17bfbdda7c923822f060c)) {
        test_fail
 }
 
 #
 #  MD5 should also be able to cope with references to octet attributes
 #
-if (&Tmp-Octets-4 != 0xac3ed17b3cf19ec38352ec534a932fc6) {
+if (!(&Tmp-Octets-4 == 0xac3ed17b3cf19ec38352ec534a932fc6)) {
        test_fail
 }
 
 #
 #  MD5 of null string is d41d8cd98f00b204e9800998ecf8427e
 #
-if (&Tmp-Octets-5 != 0x31d6cfe0d16ae931b73c59d7e0c089c0) {
+if (!(&Tmp-Octets-5 == 0x31d6cfe0d16ae931b73c59d7e0c089c0)) {
        test_fail
 }
 
index 72ef0a6c0d85d5d61568efa9edd28b2b7fa38957..38284b842ecfd094ad2bb0327e3b994ab95c1865 100644 (file)
 #  Put "This is a string" into a file and call "md5sum" on it.
 #  You should get this string.
 #
-if (&Tmp-Octets-1 != 0x9ac4dbbc3c0ad2429e61d0df5dc28add) {
+if (!(&Tmp-Octets-1 == 0x9ac4dbbc3c0ad2429e61d0df5dc28add)) {
        test_fail
 }
 
-if (&Tmp-Octets-2 != 0x9ac4dbbc3c0ad2429e61d0df5dc28add) {
+if (!(&Tmp-Octets-2 == 0x9ac4dbbc3c0ad2429e61d0df5dc28add)) {
        test_fail
 }
 
-if (&Tmp-Octets-3 != 0x9ac4dbbc3c0ad2429e61d0df5dc28add) {
+if (!(&Tmp-Octets-3 == 0x9ac4dbbc3c0ad2429e61d0df5dc28add)) {
        test_fail
 }
 
 #
 #  MD5 should also be able to cope with references to octet attributes
 #
-if (&Tmp-Octets-4 != 0xc1e7fa505b2fc1fd0da6cac3db6f6f44) {
+if (!(&Tmp-Octets-4 == 0xc1e7fa505b2fc1fd0da6cac3db6f6f44)) {
        test_fail
 }
 
 #
 #  MD5 of null string is d41d8cd98f00b204e9800998ecf8427e
 #
-if (&Tmp-Octets-5 != 0xd41d8cd98f00b204e9800998ecf8427e) {
+if (!(&Tmp-Octets-5 == 0xd41d8cd98f00b204e9800998ecf8427e)) {
        test_fail
 }
 
 #
 #  MD5 HMAC with attribute references
 #
-if (&Tmp-Octets-6 != 0x750c783e6ab0b503eaa86e310a5db738) {
+if (!(&Tmp-Octets-6 == 0x750c783e6ab0b503eaa86e310a5db738)) {
        test_fail
 }
 
 #
 #  MD5 HMAC with empty key and data
 #
-if (&Tmp-Octets-7 != 0x74e6f7298a9c2d168935f58c001bad88) {
+if (!(&Tmp-Octets-7 == 0x74e6f7298a9c2d168935f58c001bad88)) {
        test_fail
 }
 
index 6b075b575ecb6dd704b67c2229670fff3f5ecf37..6708afa110e893f41b0f721bc834878dc87754d2 100644 (file)
@@ -10,7 +10,7 @@
 
 &Tmp-Octets-0 := "%{pack:%{Framed-IP-Address}%{NAS-Port}%{NAS-IP-Address}}"
 
-if (&Tmp-Octets-0 != 0x7f000001000008407f000002) {
+if (!(&Tmp-Octets-0 == 0x7f000001000008407f000002)) {
        test_fail
 }
 
index bd77d944f3d3ce2d54c884947c408c3e36ce7cee..479ab5ed4a5dd22fbe0dbe99c8a79fb64bd9c84d 100644 (file)
@@ -34,7 +34,7 @@ if (&Tmp-String-4 != "Password.Cleartext = \"hello\"") {
        test_fail
 }
 
-if (&Tmp-String-5 != '') {
+if (!(&Tmp-String-5 == '')) {
        test_fail
 }
 
index c9cfd35259c854da50b6c2cda9ec882866ebfd64..ceecf2698dc1be5c823d890a37cff24ce758c6bc 100644 (file)
@@ -21,7 +21,7 @@ parallel {
        }
 }
 
-if ("%{control.Tmp-Integer-0[#]}" != 4) {
+if (!("%{control.Tmp-Integer-0[#]}" == 4)) {
        test_fail
 }
 
index c0ad6e8982ebdb707e2596967f60ec14a7910dae..bdba288db1f78bff14a26b7725b4795274fcd8f9 100644 (file)
@@ -61,7 +61,7 @@ group {
 if (!fail) {
        test_fail
 }
-if (&Tmp-String-0 != 'foo') {
+if (!(&Tmp-String-0 == 'foo')) {
        test_fail
 }
 
index 2425cb10f6509a44d2f95509fd3d678371c1da4e..8fa9bacf21b6f2259ec526045ee906aad4de5f93 100644 (file)
@@ -10,7 +10,7 @@ parallel {
        }
 }
 
-if (&Tmp-String-0 != 'foo') {
+if (!(&Tmp-String-0 == 'foo')) {
        test_fail
 }
 
index 24b50ac0a61af315160eac1e0e59f9cfc556d4e2..bb6cca99db3b81eb403dc922362a36df6c917355 100644 (file)
@@ -21,17 +21,17 @@ if !(&Tmp-String-0 == "") {
 #
 #  Check length of output
 #
-if (%{strlen:%{Tmp-String-1}} != 3) {
+if (!(%{strlen:%{Tmp-String-1}} == 3)) {
        test_fail
 }
 
-if (%{strlen:%{Tmp-String-2}} != 24) {
+if (!(%{strlen:%{Tmp-String-2}} == 24)) {
        test_fail
 }
 #
 #  Check maximum repetition
 #
-if (%{strlen:%{Tmp-String-3}} != 1025) {
+if (!(%{strlen:%{Tmp-String-3}} == 1025)) {
        test_fail
 }
 
@@ -47,7 +47,7 @@ if !(&Tmp-String-4 == "") {
 #
 #  Check repetition of binary output
 #
-if (%(length:%{Tmp-String-5}) != 10) {
+if (!(%(length:%{Tmp-String-5}) == 10)) {
        test_fail
 }
 
index 7ea82ffb9ae51cc7cbdffe19e21096cf61b4a7ef..17dcb412539dbdcaab8c4acb451f5cccf814b2c1 100644 (file)
@@ -66,7 +66,7 @@ foreach &Tmp-Integer-1 {
        }
 }
 
-if (&Tmp-Integer-0 != "%{Tmp-Integer-1[#]}") {
+if (!(&Tmp-Integer-0 == "%{Tmp-Integer-1[#]}")) {
        test_fail
 }
 
index 5966de527aacc67ae42e6553aa37dbd417ddaf31..ef1a03dfe1d176033bae519441f6085a5e1ff598 100644 (file)
@@ -52,7 +52,7 @@ foreach &Tmp-Integer-1 {
        }
 }
 
-if (&Tmp-Integer-0 != "%{Tmp-Integer-1[#]}") {
+if (!(&Tmp-Integer-0 == "%{Tmp-Integer-1[#]}")) {
        test_fail
 }
 
index 01f51c511d272b1535fb68918b1a36dbe3e27f2e..1001ac1ab9d7f8a159c9f724741b6253f2bfad9a 100644 (file)
@@ -41,21 +41,21 @@ if (!ok) {
        return
 }
 
-if (&Tmp-Integer-2 != 1) {
+if (!(&Tmp-Integer-2 == 1)) {
        test_fail
 }
 
-if (&Tmp-Integer-3 != 1) {
+if (!(&Tmp-Integer-3 == 1)) {
        test_fail
        return
 }
 
-if (&Tmp-Integer-4 != 1) {
+if (!(&Tmp-Integer-4 == 1)) {
        test_fail
        return
 }
 
-if (&Tmp-Integer-5 != 1) {
+if (!(&Tmp-Integer-5 == 1)) {
        test_fail
        return
 }
index 5df9fcdf2e3e65abaee2e4ff8cc66cbb50455c95..cd848655d6ab6c789c7f443df88fd421ead57849 100644 (file)
@@ -15,7 +15,7 @@ group {
        }
 }
 
-if (&Tmp-Integer-0 != 3) {
+if (!(&Tmp-Integer-0 == 3)) {
        test_fail
 }
 
index 877edcfc87659f19fa38ceb37b4b058a847b8a4d..7fa33d6a20b538dbe261c58dd06969934e8a2ab5 100644 (file)
@@ -26,7 +26,7 @@ foreach &control.Tmp-Integer-0 {
 if (!&control.Tmp-Integer-0) {
        test_fail
 }
-if (&control.Tmp-Integer-0[0] != 2) {
+if (!(&control.Tmp-Integer-0[0] == 2)) {
        test_fail
 }
 
index 3636c0b6a5b493f84b15719ac7e8c44efc2ec8cd..0630907c349b7bf1dbe37185190650d00b76a315 100644 (file)
 #  Put "This is a string" into a file and call "sha1sum" on it.
 #  You should get this string.
 #
-if (&Tmp-Octets-2 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
+if (!(&Tmp-Octets-2 == 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c)) {
        test_fail
 }
 
-if (&Tmp-Octets-3 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
+if (!(&Tmp-Octets-3 == 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c)) {
        test_fail
 }
 
-if (&Tmp-Octets-4 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
+if (!(&Tmp-Octets-4 == 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c)) {
        test_fail
 }
 
 #
 # SHA1 of empty string
 #
-if (&Tmp-Octets-5 != 0xda39a3ee5e6b4b0d3255bfef95601890afd80709) {
+if (!(&Tmp-Octets-5 == 0xda39a3ee5e6b4b0d3255bfef95601890afd80709)) {
        test_fail
 }
 
 #
 #  SHA1 HMAC with attribute references
 #
-if (&Tmp-Octets-6 != 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79) {
+if (!(&Tmp-Octets-6 == 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79)) {
        test_fail
 }
 
 #
 #  SHA1 HMAC with empty key and data
 #
-if (&Tmp-Octets-7 != 0xfbdb1d1b18aa6c08324b7d64b71fb76370690e1d) {
+if (!(&Tmp-Octets-7 == 0xfbdb1d1b18aa6c08324b7d64b71fb76370690e1d)) {
        test_fail
 }
 
index 9bba7e23f998e49ad89c87fef714dbb9e2226ce2..9dfc518451ae584437e62ef31c8cd066389c64c8 100644 (file)
 #  Put "This is a string" into a file and call "sha2_256sum" on it.
 #  You should get this string.
 #
-if (&Tmp-Octets-1 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
+if (!(&Tmp-Octets-1 == 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124)) {
        test_fail
 }
 
-if (&Tmp-Octets-2 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
+if (!(&Tmp-Octets-2 == 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124)) {
        test_fail
 }
 
-if (&Tmp-Octets-3 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
+if (!(&Tmp-Octets-3 == 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124)) {
        test_fail
 }
 
 #
 #  SHA256 should also be able to cope with references to octet attributes
 #
-if (&Tmp-Octets-4 != 0xf307e202b881fded70e58017aa0c4d7b29c76ab25d02bf078301a5f6635187eb) {
+if (!(&Tmp-Octets-4 == 0xf307e202b881fded70e58017aa0c4d7b29c76ab25d02bf078301a5f6635187eb)) {
        test_fail
 }
 
 #
 # SHA256 of empty string
 #
-if (&Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) {
+if (!(&Tmp-Octets-5 == 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)) {
        test_fail
 }
 
@@ -48,15 +48,15 @@ if (&Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7
 &Tmp-Octets-2 := "%{sha2_512:%{Tmp-String-0}}"
 &Tmp-Octets-3 := "%{sha2_512:%{request.Tmp-Octets-0}}"
 
-if (&Tmp-Octets-1 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) {
+if (!(&Tmp-Octets-1 == 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f)) {
        test_fail
 }
 
-if (&Tmp-Octets-2 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) {
+if (!(&Tmp-Octets-2 == 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f)) {
        test_fail
 }
 
-if (&Tmp-Octets-3 != 0xde80271eb5e03a1c24dd0cd823a22305a743ee3a54f1de5bf97adbf56984561154bfb6928b1da4ccc3f5dde9f4032ad461937b60b9ace4ad3898cf45c90596d7) {
+if (!(&Tmp-Octets-3 == 0xde80271eb5e03a1c24dd0cd823a22305a743ee3a54f1de5bf97adbf56984561154bfb6928b1da4ccc3f5dde9f4032ad461937b60b9ace4ad3898cf45c90596d7)) {
        test_fail
 }
 
index f5ed01ccf6936df0c3d5994c919a56e78d436c0f..4aef60c8c510e77522bdb87b3c58bb64f95e34a3 100644 (file)
@@ -8,6 +8,6 @@ if (!&control.User-Name) {
        test_fail
 }
 
-if (&control.User-Name != 'bob') {
+if (!(&control.User-Name == 'bob')) {
        test_fail
 }
index 19f4ed4b890b91d0229b4ae0a0d081f5ed76ae87..8f1f01338c9cf021d4f84a801827f02596f41123 100644 (file)
@@ -16,6 +16,6 @@ if (!&control.User-Name) {
        test_fail
 }
 
-if (&control.User-Name != 'bob') {
+if (!(&control.User-Name == 'bob')) {
        test_fail
 }
index 557407066dc9af7681f6c4c6a79f35eb3a45bc8b..c88eda26710d492b6dc6ae314f6c2d39934be2ed 100644 (file)
@@ -8,7 +8,7 @@ subrequest Access-Request {
                test_fail
        }
 
-       if (&User-Name != 'bob') {
+       if (!(&User-Name == 'bob')) {
                test_fail
        }
 
index 24e644b29a6931fbed183bca7a40f124d97f37a6..de8e098f2c8e9863008502c6b4925f00d4072163 100644 (file)
@@ -13,7 +13,7 @@ if (&Tmp-String-1) {
        test_fail
 }
 
-if (&Tmp-String-0 != "testing1234") {
+if (!(&Tmp-String-0 == "testing1234")) {
        test_fail
 }
 
index 4a622f74af2aba810bfe240495630eaffcde2ddf..e7d97a60dba88ee2360e4aec50a68b81331cd5b5 100644 (file)
@@ -6,7 +6,7 @@ subrequest Access-Request &request &reply.Tmp-Group-0 {
                test_fail
        }
 
-       if (&User-Name != 'bob') {
+       if (!(&User-Name == 'bob')) {
                test_fail
        }
 
index 405f74f682f59dfe540bc1a3d7a3a97d0106fe09..b45a7cdfc49d64a065af6343d65f5c7ff1968719 100644 (file)
@@ -7,7 +7,7 @@ subrequest Access-Request &request &reply.Tmp-Group-0 {
                        test_fail
                }
 
-               if (&User-Name != 'bob') {
+               if (!(&User-Name == 'bob')) {
                        test_fail
                }
 
index 5283ea4904138c0383352affa776f01444536df6..0cae57d275548b78032e18362970859bcf94f805 100644 (file)
 &Tmp-String-2  := "%{tolower:%{Tmp-String-9}}"
 
 
-if (&Tmp-String-0 != "abcde") {
+if (!(&Tmp-String-0 == "abcde")) {
        test_fail
 }
 
-if (&Tmp-String-1 != "aabbccdd") {
+if (!(&Tmp-String-1 == "aabbccdd")) {
        test_fail
 }
 
index e08425dbed30ac37f7152d87c6a410ee29e46884..5dfbc992f3720903de98084d23fa44d6c55ff0ab 100644 (file)
@@ -7,11 +7,11 @@
 &Tmp-String-1  := "%{toupper:AAbbCCdd}"
 &Tmp-String-2  := "%{toupper:%{Tmp-String-9}}"
 
-if (&Tmp-String-0 != "ABCDE") {
+if (!(&Tmp-String-0 == "ABCDE")) {
        test_fail
 }
 
-if (&Tmp-String-1 != "AABBCCDD") {
+if (!(&Tmp-String-1 == "AABBCCDD")) {
        test_fail
 }
 
index bd52e37d17276f31ec3e01f6cbc27c2a993cb8c7..429f32eedafcc48379fe29689687753061473ec9 100644 (file)
@@ -73,7 +73,7 @@ a02f4a3ab98d75992d68a15d393387fe9ef01041569570ad6fe884764e55567311bcacfcffae7655
 3ae4bcef324b9a3f47ba5c835b54a010ca42f3b9cc5368278c148c9b02ea8c4c9f244fd49f
 
 # Actual length of octet string is 4083 bytes
-if (%(length:%{Tmp-Octets-0}) != 4083) {
+if (!(%(length:%{Tmp-Octets-0}) == 4083)) {
        test_fail
 }
 
@@ -84,7 +84,7 @@ if ("%{Tmp-Octets-0}" !~ /^0x([0-9a-f]+)$/) {
 
 &Tmp-String-0 := "%{1}"
 
-if ("%(length:%{Tmp-String-0})" != 8166) {
+if (!("%(length:%{Tmp-String-0})" == 8166)) {
        test_fail
 }
 
index 94ade08f031a4d9034cb7b37d7b71cd4b7959d02..c3790cb938fe74071ca5a3b7623f10cc406ac8e1 100644 (file)
@@ -10,7 +10,7 @@ update request {
 #
 &26.24757.84.9.5.7 := 0xab
 
-if (&26.24757.84.9.5.7 != 0xab) {
+if (!(&26.24757.84.9.5.7 == 0xab)) {
        test_fail
 }
 
@@ -19,7 +19,7 @@ if (&26.24757.84.9.5.7 != 0xab) {
 #
 &26.24757.84.9.5.15 := 0xabcdef
 
-if (&26.24757.84.9.5.15 != 0xabcdef) {
+if (!(&26.24757.84.9.5.15 == 0xabcdef)) {
        test_fail
 }
 
@@ -31,7 +31,7 @@ if (&26.11344.1 == 127.0.0.1) {
        test_fail
 }
 
-if (&26.11344.1 != 127.0.0.2) {
+if (!(&26.11344.1 == 127.0.0.2)) {
        test_fail
 }
 
@@ -41,7 +41,7 @@ if (&Vendor-Specific.FreeRADIUS.Proxied-To == 127.0.0.2) {
        test_fail
 }
 
-if (&Vendor-Specific.FreeRADIUS.Proxied-To != 127.0.0.1) {
+if (!(&Vendor-Specific.FreeRADIUS.Proxied-To == 127.0.0.1)) {
        test_fail
 }
 
@@ -49,13 +49,13 @@ if (&26.11344.1 == 127.0.0.2) {
        test_fail
 }
 
-if (&26.11344.1 != 127.0.0.1) {
+if (!(&26.11344.1 == 127.0.0.1)) {
        test_fail
 }
 
 &26.66.1 = 0x01020304
 
-if (&26.66.1 != 0x01020304) {
+if (!(&26.66.1 == 0x01020304)) {
        test_fail
 }
 
index 58ffdb0d378757cba77a80dfa2a6bd3334630b72..8f57ff0203d633de5b3d3d262fe5c71914285976 100644 (file)
@@ -20,20 +20,20 @@ update request {
        &Proxy-State += &Class[2]
 }
 
-if (&Proxy-State != 0x01020304) {
+if (!(&Proxy-State == 0x01020304)) {
        test_fail
 }
 
 #  Must be the same as above
-if (&Proxy-State[0] != 0x01020304) {
+if (!(&Proxy-State[0] == 0x01020304)) {
        test_fail
 }
 
-if (&Proxy-State[1] != 0x05060708) {
+if (!(&Proxy-State[1] == 0x05060708)) {
        test_fail
 }
 
-if (&Proxy-State[2] != 0x090a0b0c) {
+if (!(&Proxy-State[2] == 0x090a0b0c)) {
        test_fail
 }
 
index 599ae69d3b010539da2c1e9e5138495e50086743..2e787f2aad4a164454e76eba7b145f2f0cdc9f85 100644 (file)
@@ -10,11 +10,11 @@ update request {
        &control !* ANY
 }
 
-if ("%{Tmp-String-0[#]}" != 2) {
+if (!("%{Tmp-String-0[#]}" == 2)) {
        test_fail
 }
 
-if (&Tmp-String-0[0] != 'foo') {
+if (!(&Tmp-String-0[0] == 'foo')) {
        test_fail
 }
 
@@ -27,7 +27,7 @@ update {
 }
 
 # Should only remove 'bar'
-if (&Tmp-String-0[0] != 'foo') {
+if (!(&Tmp-String-0[0] == 'foo')) {
        test_fail
 }
 
index 5484f7e0cf58768d8fcb5546ec7a91d44c85bc6d..d01367a3d58112d9fd98a8305dc9fefbab04751c 100644 (file)
@@ -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
 }
 
index 5b706c09debda5192922dc22f513b6ee73ff9a06..0ee24aff16e7ba371dfaff4141ff7de168e64367 100644 (file)
@@ -20,7 +20,7 @@ update {
        &request = `/bin/sh -c "echo Tmp-String-0 := foo"`
 }
 
-if (!&Tmp-String-0 || (&Tmp-String-0 != 'foo')) {
+if (!&Tmp-String-0 || (!(&Tmp-String-0 == 'foo'))) {
        test_fail
 }
 
@@ -31,7 +31,7 @@ update {
        &request = `/bin/sh -c 'echo Tmp-String-0 := foo, Tmp-String-1 := bar'`
 }
 
-if (!&Tmp-String-0 || !&Tmp-String-1 || (&Tmp-String-0 != 'foo') || (&Tmp-String-1 != 'bar')) {
+if (!&Tmp-String-0 || !&Tmp-String-1 || (!(&Tmp-String-0 == 'foo')) || (!(&Tmp-String-1 == 'bar'))) {
        test_fail
 }
 
index fdc11494f6cc1668e5489f2c41e76fab28e78034..a2bbf3c2bfa6c4e668cc15fe7bf322649a50a019 100644 (file)
@@ -25,15 +25,15 @@ update request {
        &Tmp-Integer-0 == 10
 }
 
-if (&Tmp-Integer-0[0] != 10) {
+if (!(&Tmp-Integer-0[0] == 10)) {
        test_fail
 }
 
-if ("%{Tmp-Integer-0[#]}" != 1) {
+if (!("%{Tmp-Integer-0[#]}" == 1)) {
        test_fail
 }
 
-if ("%{Tmp-String-0[#]}" != 3) {
+if (!("%{Tmp-String-0[#]}" == 3)) {
        test_fail
 }
 
@@ -47,11 +47,11 @@ update request {
        &Tmp-String-0 == 'baz'
 }
 
-if (&Tmp-String-0[0] != 'baz') {
+if (!(&Tmp-String-0[0] == 'baz')) {
        test_fail
 }
 
-if ("%{Tmp-String-0[#]}" != 1) {
+if (!("%{Tmp-String-0[#]}" == 1)) {
        test_fail
 }
 
@@ -65,15 +65,15 @@ update request {
        &Tmp-Integer-0 < 10
 }
 
-if (&Tmp-Integer-0[0] != 5) {
+if (!(&Tmp-Integer-0[0] == 5)) {
        test_fail
 }
 
-if ("%{Tmp-Integer-0[#]}" != 1) {
+if (!("%{Tmp-Integer-0[#]}" == 1)) {
        test_fail
 }
 
-if ("%{Tmp-String-0[#]}" != 3) {
+if (!("%{Tmp-String-0[#]}" == 3)) {
        test_fail
 }
 
@@ -87,20 +87,20 @@ update request {
        &Tmp-Integer-0 > 10
 }
 
-if (&Tmp-Integer-0[0] != 15) {
+if (!(&Tmp-Integer-0[0] == 15)) {
        test_fail
 }
 
-if (&Tmp-Integer-0[1] != 20) {
+if (!(&Tmp-Integer-0[1] == 20)) {
        test_fail
 }
 
 
-if ("%{Tmp-Integer-0[#]}" != 2) {
+if (!("%{Tmp-Integer-0[#]}" == 2)) {
        test_fail
 }
 
-if ("%{Tmp-String-0[#]}" != 3) {
+if (!("%{Tmp-String-0[#]}" == 3)) {
        test_fail
 }
 
@@ -115,19 +115,19 @@ update request {
        &Tmp-Integer-0 <= 10
 }
 
-if (&Tmp-Integer-0[0] != 5) {
+if (!(&Tmp-Integer-0[0] == 5)) {
        test_fail
 }
 
-if (&Tmp-Integer-0[1] != 10) {
+if (!(&Tmp-Integer-0[1] == 10)) {
        test_fail
 }
 
-if ("%{Tmp-Integer-0[#]}" != 2) {
+if (!("%{Tmp-Integer-0[#]}" == 2)) {
        test_fail
 }
 
-if ("%{Tmp-String-0[#]}" != 3) {
+if (!("%{Tmp-String-0[#]}" == 3)) {
        test_fail
 }
 
@@ -141,23 +141,23 @@ update request {
        &Tmp-Integer-0 >= 10
 }
 
-if (&Tmp-Integer-0[0] != 10) {
+if (!(&Tmp-Integer-0[0] == 10)) {
        test_fail
 }
 
-if (&Tmp-Integer-0[1] != 15) {
+if (!(&Tmp-Integer-0[1] == 15)) {
        test_fail
 }
 
-if (&Tmp-Integer-0[2] != 20) {
+if (!(&Tmp-Integer-0[2] == 20)) {
        test_fail
 }
 
-if ("%{Tmp-Integer-0[#]}" != 3) {
+if (!("%{Tmp-Integer-0[#]}" == 3)) {
        test_fail
 }
 
-if ("%{Tmp-String-0[#]}" != 3) {
+if (!("%{Tmp-String-0[#]}" == 3)) {
        test_fail
 }
 
@@ -171,23 +171,23 @@ update request {
        &Tmp-Integer-0 != 10
 }
 
-if (&Tmp-Integer-0[0] != 5) {
+if (!(&Tmp-Integer-0[0] == 5)) {
        test_fail
 }
 
-if (&Tmp-Integer-0[1] != 15) {
+if (!(&Tmp-Integer-0[1] == 15)) {
        test_fail
 }
 
-if (&Tmp-Integer-0[2] != 20) {
+if (!(&Tmp-Integer-0[2] == 20)) {
        test_fail
 }
 
-if ("%{Tmp-Integer-0[#]}" != 3) {
+if (!("%{Tmp-Integer-0[#]}" == 3)) {
        test_fail
 }
 
-if ("%{Tmp-String-0[#]}" != 3) {
+if (!("%{Tmp-String-0[#]}" == 3)) {
        test_fail
 }
 
@@ -206,11 +206,11 @@ update request {
        &Tmp-String-0 == &Tmp-String-1[0]
 }
 
-if (&Tmp-String-0[0] != &Tmp-String-1[0]) {
+if (!(&Tmp-String-0[0] == &Tmp-String-1[0])) {
        test_fail
 }
 
-if ("%{Tmp-String-0[#]}" != 1) {
+if (!("%{Tmp-String-0[#]}" == 1)) {
        test_fail
 }
 
index 90c659cc8a0969b64e1ce8303527991cc17d6868..884ca5591c93f9955f058e24bea2b223c132acb7 100644 (file)
@@ -8,7 +8,7 @@ update {
        &Tmp-String-0 := 0x626f62
 }
 
-if (&Tmp-String-0 != 'bob') {
+if (!(&Tmp-String-0 == 'bob')) {
        test_fail
 }
 
@@ -16,7 +16,7 @@ update {
        &Tmp-String-0 := '0x626f62'
 }
 
-if (&Tmp-String-0 != '0x626f62') {
+if (!(&Tmp-String-0 == '0x626f62')) {
        test_fail
 }
 
index 8ba62e10442de07759f2967e19e330367eac102e..1f02b7f5702e7966a510f63b6ac7b663296d9045 100644 (file)
@@ -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,13 +25,13 @@ 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
 }
 
 # Verify we haven't acquired any extra..
 
-if ("%{control.Reply-Message[#]}" != 3) {
+if (!("%{control.Reply-Message[#]}" == 3)) {
        test_fail
 }
 
index ad0c56587b3ae8c2f40f2ab83c31103689d9b5a7..8956c8be5023f176f3bdae6c120842c1f2c8888a 100644 (file)
@@ -14,7 +14,7 @@ update request {
        &control !* ANY
 }
 
-if (&Tmp-String-0[0] != 'foo') {
+if (!(&Tmp-String-0[0] == 'foo')) {
        test_fail
 }
 
index 5e0f1780b19d309c96305c2ed16aef90521cc29d..f3130c2de3f6f283d87c2d41c3211523f723feea 100644 (file)
@@ -24,7 +24,7 @@ update request {
 if (!&Tmp-String-0) {
        test_fail
 }
-if (&Tmp-String-0 != '') {
+if (!(&Tmp-String-0 == '')) {
        test_fail
 }
 
@@ -36,7 +36,7 @@ if (&Tmp-String-0 != '') {
 update request {
        &Tmp-Octets-0 := "%{Reply-Message}"
 }
-if (&Tmp-Octets-0 != "") {
+if (!(&Tmp-Octets-0 == "")) {
        test_fail
 }
 
index fde9093829d91fbc0bbe0a6a3143f31fe3233aea..7c260d683dd31d269bcdb15f7deb6a93d3057a94 100644 (file)
@@ -28,11 +28,11 @@ 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
 }
 
-if ("%{Tmp-String-0[#]}" != 3) {
+if (!("%{Tmp-String-0[#]}" == 3)) {
        test_fail
 }
 
@@ -47,11 +47,11 @@ 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
 }
 
-if ("%{Tmp-String-0[#]}" != 6) {
+if (!("%{Tmp-String-0[#]}" == 6)) {
        test_fail
 }
 
@@ -71,11 +71,11 @@ 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
 }
 
-if ("%{control.Tmp-String-0[#]}" != 7) {
+if (!("%{control.Tmp-String-0[#]}" == 7)) {
        test_fail
 }
 
index 4260ed4ae239c0c7096b01b14166ef00b41b476e..7c184159d25287d8addf0a28ebc08952f2be6062 100644 (file)
@@ -11,7 +11,7 @@ update {
        &control.Tmp-IP-Address-1 := 192.0.3.1
 }
 
-if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || ("%{Tmp-IP-Address-0[1]}" != 192.0.2.2)) {
+if (!(("%{Tmp-IP-Address-0[0]}" == 192.0.2.1)) || (!("%{Tmp-IP-Address-0[1]}" == 192.0.2.2))) {
        test_fail
 }
 
@@ -21,17 +21,17 @@ update {
 }
 
 # Non Tmp-IP-Address-0 address attributes should still be in the request list
-if ((&Tmp-String-0 != 'foobarbaz') || (&Tmp-Integer-0 != 123456789)) {
+if (!((&Tmp-String-0 == 'foobarbaz')) || (!(&Tmp-Integer-0 == 123456789))) {
        test_fail
 }
 
 # There should be no Tmp-IP-Address attributes in the request list
-if (&Tmp-IP-Address-0 || ("%{Tmp-IP-Address-0[1]}" != '')) {
+if (&Tmp-IP-Address-0 || (!("%{Tmp-IP-Address-0[1]}" == ''))) {
        test_fail
 }
 
 # But there should still be some in the control list
-if ((&control.Tmp-IP-Address-0 != 192.0.2.1) || ("%{control.Tmp-IP-Address-0[1]}" != 192.0.2.3)) {
+if (!((&control.Tmp-IP-Address-0 == 192.0.2.1)) || (!("%{control.Tmp-IP-Address-0[1]}" == 192.0.2.3))) {
        test_fail
 }
 
index 5484f7e0cf58768d8fcb5546ec7a91d44c85bc6d..d01367a3d58112d9fd98a8305dc9fefbab04751c 100644 (file)
@@ -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
 }
 
index 851f431c9bdb9bec1091b4f6bb0a12753e33c3cb..578bd01371e89a73b94a21d85ee180b0a9a038ee 100644 (file)
@@ -36,11 +36,11 @@ update reply {
        &Tmp-Integer-0 += 13
 }
 
-if (&reply.Tmp-Integer-0[0] != 12) {
+if (!(&reply.Tmp-Integer-0[0] == 12)) {
        test_fail
 }
 
-if (&reply.Tmp-Integer-0[1] != 13) {
+if (!(&reply.Tmp-Integer-0[1] == 13)) {
        test_fail
 }
 
index 3b71d90ca8811256cfcaf1b75acfd96381000e26..5345dca93a7018bb3554ad608bb47f511a5d0a5f 100644 (file)
 }
 
 
-if (&Tmp-String-1 != &Tmp-String-0) {
+if (!(&Tmp-String-1 == &Tmp-String-0)) {
        test_fail
 }
 
-if (&Tmp-String-3 != &Tmp-String-6) {
+if (!(&Tmp-String-3 == &Tmp-String-6)) {
        test_fail
 }
 
-if (&Tmp-String-5 != &Tmp-String-8) {
+if (!(&Tmp-String-5 == &Tmp-String-8)) {
        test_fail
 }
 
-if (&Tmp-String-7 != &Tmp-String-2) {
+if (!(&Tmp-String-7 == &Tmp-String-2)) {
        test_fail
 }
 
-if (&Tmp-String-9 != &Tmp-String-4) {
+if (!(&Tmp-String-9 == &Tmp-String-4)) {
        test_fail
 }
 
@@ -44,7 +44,7 @@ if (&Tmp-String-9 != &Tmp-String-4) {
 &request -= &Tmp-String-2[*]
 &Tmp-String-2 := "%{urlunquote:%%E,123}"
 
-if (&Tmp-String-1 != &Tmp-String-0) {
+if (!(&Tmp-String-1 == &Tmp-String-0)) {
        test_fail
 }
 
index db596222e38ef32c871c593c97d60ccebc59f2f6..331140aa447d8a69da746bfd8330b8bf5b6a68da 100644 (file)
@@ -10,7 +10,7 @@ update request {
 if (!&raw.26) {
        test_fail
 }
-elsif (&raw.26 != 0x01020304) {
+elsif (!(&raw.26 == 0x01020304)) {
        test_fail
 }
 else {
index a0ccbbfc55e2e015be0d20bbfcce9f09768b5bfe..f6857a1b9443dba45ecdf6f85bd93da1568ab1cf 100644 (file)
@@ -2,7 +2,7 @@ update request {
        &Vendor-Specific.WiMAX.Packet-Flow-Descriptor-v2.Classifier.Src-Spec.Port = 6809
 }
 
-if (&Vendor-Specific.WiMAX.Packet-Flow-Descriptor-v2.Classifier.Src-Spec.Port != 6809) {
+if (!(&Vendor-Specific.WiMAX.Packet-Flow-Descriptor-v2.Classifier.Src-Spec.Port == 6809)) {
        test_fail
 }
 
@@ -12,7 +12,7 @@ update request {
        &26.24757.84.9.5.7 = 0x01
 }
 
-if (&Vendor-Specific.WiMAX.Packet-Flow-Descriptor-v2.Classifier.Src-Spec.Assigned != 1) {
+if (!(&Vendor-Specific.WiMAX.Packet-Flow-Descriptor-v2.Classifier.Src-Spec.Assigned == 1)) {
        test_fail
 }
 
index fb5e7a2acf34e4ea7f3a00c494a7f664cd0e7ddc..38df4b97805a5fec462746062bf6f09166206f7c 100644 (file)
@@ -9,7 +9,7 @@
 #  First choice
 #
 &Tmp-String-2 := "%{%{Tmp-String-0}:-%{Tmp-String-1}}"
-if (&Tmp-String-2 != 'foo') {
+if (!(&Tmp-String-2 == 'foo')) {
        test_fail
 }
 
@@ -18,7 +18,7 @@ if (&Tmp-String-2 != 'foo') {
 #
 &request -= &Tmp-String-0[*]
 &Tmp-String-2 := "%{%{Tmp-String-0}:-%{Tmp-String-1}}"
-if (&Tmp-String-2 != 'bar') {
+if (!(&Tmp-String-2 == 'bar')) {
        test_fail
 }
 
index fc6bfd02f849f52b01e95f4443ae6db418d1d4bc..dc167b13cf511c50199ad754f859f1c833a9f271 100644 (file)
@@ -2,15 +2,15 @@
        &Tmp-IP-Address-0 = 192.0.2.1
        &Tmp-IP-Address-0 = 192.0.2.2
 }
-if ("%{Tmp-IP-Address-0[#]}" != 2) {
+if (!("%{Tmp-IP-Address-0[#]}" == 2)) {
        test_fail
 }
 
-if ((&Tmp-IP-Address-0[0] != 192.0.2.1) || ("%{Tmp-IP-Address-0[1]}" != 192.0.2.2)) {
+if (!((&Tmp-IP-Address-0[0] == 192.0.2.1)) || (!("%{Tmp-IP-Address-0[1]}" == 192.0.2.2))) {
        test_fail
 }
 
-if ("%{Tmp-IP-Address-0[*]}" != '192.0.2.1192.0.2.2') {
+if (!("%{Tmp-IP-Address-0[*]}" == '192.0.2.1192.0.2.2')) {
        test_fail
 }
 
@@ -23,11 +23,11 @@ if ("%{Tmp-IP-Address-0[*]}" != '192.0.2.1192.0.2.2') {
        &Tmp-Integer-0 = "%{Tmp-IP-Address-0[#]}"
 }
 
-if (&Tmp-String-0 != '192.0.2.1,192.0.2.2') {
+if (!(&Tmp-String-0 == '192.0.2.1,192.0.2.2')) {
        test_fail
 }
 
-if (&Tmp-Integer-0 != 2) {
+if (!(&Tmp-Integer-0 == 2)) {
        test_fail
 }
 
index 45ab1a41c971295027888281b37c2ef98b1c713f..d51b54b619224b8b538ecc7c71674d35758fcfc4 100644 (file)
@@ -3,13 +3,13 @@
 #
 
 &Tmp-String-0 := "%(config:modules.test.boolean)"
-if (&Tmp-String-0 != "no") {
+if (!(&Tmp-String-0 == "no")) {
        test_fail
 }
 
 &Tmp-String-0 := "test"
 &Tmp-Integer-0 := "%(config:modules.%{Tmp-String-0}.integer)"
-if (&Tmp-Integer-0 != 1) {
+if (!(&Tmp-Integer-0 == 1)) {
        test_fail
 }
 
index e6efb2cdd9a1fa56e30d2911b172515ca1d4628e..341d46fa5b8a96ca5430ed034f4a2ccaf44cbde7 100644 (file)
@@ -3,15 +3,15 @@
 #
 
 &Tmp-Octets-0 := 0x520d0103abcdef0206010203040506
-if ("%(decode.dhcpv4:%{Tmp-Octets-0})" != 2) {
+if (!("%(decode.dhcpv4:%{Tmp-Octets-0})" == 2)) {
        test_fail
 }
 
-if (&Relay-Agent-Information.Circuit-Id != 0xabcdef) {
+if (!(&Relay-Agent-Information.Circuit-Id == 0xabcdef)) {
        test_fail
 }
 
-if (&Relay-Agent-Information.Remote-Id != 0x010203040506) {
+if (!(&Relay-Agent-Information.Remote-Id == 0x010203040506)) {
        test_fail
 }
 
index c89e152b51b017b0b7d338a186c331f21a274a0a..4f94291bf861640ecb123f12c4938ce28c85b67e 100644 (file)
@@ -1,6 +1,6 @@
 # Regression test for double consecutive alternations
 &Tmp-uint64-0 := "%{%{Acct-Input-Octets}:-2}%{%{Acct-Input-Gigawords}:-1}"
-if (&Tmp-uint64-0 != 21) {
+if (!(&Tmp-uint64-0 == 21)) {
        test_fail
 }
 
index 7904dec7e8bdaa06a28e08c9ed82d3eab673562d..01b10009d6f2377fc62caf08839d46c735c4739b 100644 (file)
@@ -12,7 +12,7 @@ if ("%{tolower:\%{ FOO}" != '%{ foo') {
        test_fail
 }
 
-if ("\%D" != '%D') {
+if (!("\%D" == '%D')) {
        test_fail
 }
 
index d608f9a2ae7346efd208f9a3a122cc9ce056e9f2..9224802dcf79e81512e9f0a644b74715ef22ff60 100644 (file)
 #
 #  Verify non string types are treated as literals
 #
-if ("%{eval:%{Tmp-Integer-0}}" != 4) {
+if (!("%{eval:%{Tmp-Integer-0}}" == 4)) {
        test_fail
 }
 
-if ("%{eval:%{Tmp-Integer-0[1]}}" != 8) {
+if (!("%{eval:%{Tmp-Integer-0[1]}}" == 8)) {
        test_fail
 }
 
 #
 #  Check double expansion works
 #
-if ("%{eval:%{Tmp-String-0}}" != 'foo') {
+if (!("%{eval:%{Tmp-String-0}}" == 'foo')) {
        test_fail
 }
 
 #
 #  Using an attribute as a dynamic index for another attribute
 #
-if ("%{eval:\%{Tmp-String-1[%{Tmp-Integer-0[2]}]\}}" != 'bar') {
+if (!("%{eval:\%{Tmp-String-1[%{Tmp-Integer-0[2]}]\}}" == 'bar')) {
        test_fail
 }
 
index 38021333a85196644ec45853522e40860dd7a846..233e1d3758ffb7696910ccd30019c35db9f2f55e 100644 (file)
@@ -12,7 +12,7 @@ if (&Tmp-String-1 != "hello foo:1234 world") {
 
 # User-Password contains characters that need escaping
 &Tmp-String-2 := `/bin/echo %{User-Password}`
-if (&Tmp-String-2 != &User-Password) {
+if (!(&Tmp-String-2 == &User-Password)) {
        test_fail
 } else {
        &User-Password := "hello"
index 7e46b0c76c33a0f528a7b958602bc4e21ab8c5f2..5c432150ec6fd886e9faf9d860f1b28d2543901a 100644 (file)
 
 debug_all
 
-if ("%{Tmp-String-1}" != "1=1,my_attr=2,my_attr=hello") {
+if (!("%{Tmp-String-1}" == "1=1,my_attr=2,my_attr=hello")) {
        test_fail
 }
 
-if ("%{Tmp-String-2}" != "") {
+if (!("%{Tmp-String-2}" == "")) {
        test_fail
 }
 
-if ("%{Tmp-String-3}" != "hello,goodbye,morning,night,1") {
+if (!("%{Tmp-String-3}" == "hello,goodbye,morning,night,1")) {
        test_fail
 }
 
index 86e6d3eb705fae96bd3381e819887274dcfce5a5..c3d192eb9862a687a74f4b25766f85db44535e7d 100644 (file)
@@ -2,7 +2,7 @@
 &Tmp-Integer-0 := "%(debug:4)"
 
 # Check debug level is now 4
-if ("%(debug:4)" != 4) {
+if (!("%(debug:4)" == 4)) {
        test_fail
 }
 
@@ -10,7 +10,7 @@ if ("%(debug:4)" != 4) {
 "%(debug:%{Tmp-Integer-0})"
 
 # Read out the current debug level to verify it changed
-if ("%(debug:%{Tmp-Integer-0})" != "%{Tmp-Integer-0}") {
+if (!("%(debug:%{Tmp-Integer-0})" == "%{Tmp-Integer-0}")) {
        test_fail
 }
 
index 3403e16212a484580b8d216cdc95311598ca6240..f7fd52eff6e0f52c7681f4634acf0d763ad62278 100644 (file)
 &Tmp-String-1 := "%(interpreter:.name)"
 &Tmp-String-2 := "%(interpreter:.type)"
 
-if (&Tmp-String-0 != "src/tests/keywords/xlat-interpreter") {
+if (!(&Tmp-String-0 == "src/tests/keywords/xlat-interpreter")) {
        test_fail
 }
 
-if (&Tmp-String-1 != "&Tmp-String-1") {
+if (!(&Tmp-String-1 == "&Tmp-String-1")) {
        test_fail
 }
 
-if (&Tmp-String-2 != "edit") {
+if (!(&Tmp-String-2 == "edit")) {
        test_fail
 }
 
-if (&Tmp-Integer-0 != 9) {
+if (!(&Tmp-Integer-0 == 9)) {
        test_fail
 }
 
index b2374c32418dac4aa0d629a3ea0730f84ba1976e..5b07413b94bc4cc48dced1cbcd1e741b1633bc09 100644 (file)
        &Tmp-Octets-0 = 0x0706050403020100
 }
 
-if ("%{Tmp-Octets-0}" != '0x0001020304050607') {
+if (!("%{Tmp-Octets-0}" == '0x0001020304050607')) {
        test_fail
 }
 
-if ("%{Tmp-Octets-0[0]}" != '0x0001020304050607') {
+if (!("%{Tmp-Octets-0[0]}" == '0x0001020304050607')) {
        test_fail
 }
 
-if ("%{Tmp-Octets-0[*]}" != '0x00010203040506070x0706050403020100') {
+if (!("%{Tmp-Octets-0[*]}" == '0x00010203040506070x0706050403020100')) {
        test_fail
 }
 
index 0885bd0ca54314b290242b5c9115a707df82daf0..045d36145c3d65246ad2f1185f4a447b94cbf754 100644 (file)
@@ -22,7 +22,7 @@
 #  like every other data type.  If we want to *convert* the octets to
 #  a string, we have to use "%{string:...}"
 #
-if ((string)&Tmp-Octets-0 != "0x5c5c") {
+if (!((string)&Tmp-Octets-0 == "0x5c5c")) {
        test_fail
 }
 
@@ -33,7 +33,7 @@ if ((string)&Tmp-Octets-0 == 0x5c5c) {
        test_fail
 }
 
-if (&Tmp-String-0 != "\\\\") {
+if (!(&Tmp-String-0 == "\\\\")) {
        test_fail
 }
 
@@ -47,15 +47,15 @@ if ((string)&Tmp-Octets-0 == "%{string:%{Tmp-Octets-0}}") {
 #
 #  Test interpolation between string expansions and strings
 #
-if ("%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}" != "test1test2") {
+if (!("%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}" == "test1test2")) {
        test_fail
 }
 
-if ("test0%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}" != "test0test1test2") {
+if (!("test0%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}" == "test0test1test2")) {
        test_fail
 }
 
-if ("%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}test3" != "test1test2test3") {
+if (!("%{string:%{Tmp-Octets-4}}%{string:%{Tmp-Octets-5}}test3" == "test1test2test3")) {
        test_fail
 }
 
@@ -63,11 +63,11 @@ if (&Tmp-String-1 != 'I like chicken I like liver') {
        test_fail
 }
 
-if (&Tmp-String-2 != "I\000I") {
+if (!(&Tmp-String-2 == "I\000I")) {
        test_fail
 }
 
-if (&Tmp-String-3 != "\000") {
+if (!(&Tmp-String-3 == "\000")) {
        test_fail
 }
 
index ada646f475ece2eea4016357b608db53fd028352..b5efd019e786cb1379a0cc1ed98fff060ec48283 100644 (file)
@@ -77,7 +77,7 @@ if ("%(subst:%{Tmp-String-0} /z/ b)" != 'aaa') {
 #
 
 # Check that newlines really are newlines
-if ("%(length:%{Tmp-String-1})" != 3) {
+if (!("%(length:%{Tmp-String-1})" == 3)) {
        test_fail
 }