From: Alan T. DeKok Date: Tue, 30 Aug 2022 19:26:53 +0000 (-0400) Subject: convert whitespace to tabs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd83232fa3f9cba355db9ac5531cb27b957a9874;p=thirdparty%2Ffreeradius-server.git convert whitespace to tabs --- diff --git a/src/tests/keywords/array b/src/tests/keywords/array index 700fed0bc6d..e631fe4f2f8 100644 --- a/src/tests/keywords/array +++ b/src/tests/keywords/array @@ -4,9 +4,9 @@ # Tests for dereferencing the Nth attribute # &request += { - &Class = 0x01020304, - &Class = 0x05060708, - &Class = 0x090a0b0c, + &Class = 0x01020304, + &Class = 0x05060708, + &Class = 0x090a0b0c, } if (%{Class[#]} != 3) { diff --git a/src/tests/keywords/case-duplicate b/src/tests/keywords/case-duplicate index 0aae7879457..fc13854f715 100644 --- a/src/tests/keywords/case-duplicate +++ b/src/tests/keywords/case-duplicate @@ -2,7 +2,7 @@ # switch &reply.Filter-Id { case "filter" { - ok + ok } case "filter" { # ERROR diff --git a/src/tests/keywords/cmp-ipaddr b/src/tests/keywords/cmp-ipaddr index be7884d80a4..62731948f4a 100644 --- a/src/tests/keywords/cmp-ipaddr +++ b/src/tests/keywords/cmp-ipaddr @@ -1,7 +1,7 @@ # # PRE: if # -&NAS-IP-Address := 127.0.0.1 +&NAS-IP-Address := 127.0.0.1 &Framed-IP-Address := 127.0.0.1 # @@ -11,7 +11,7 @@ if (!(&NAS-IP-Address == &Framed-IP-Address)) { test_fail } -&NAS-IP-Address := 0.0.0.0 +&NAS-IP-Address := 0.0.0.0 &Framed-IP-Address := 255.255.255.255 if (!(&NAS-IP-Address != &Framed-IP-Address)) { diff --git a/src/tests/keywords/comments b/src/tests/keywords/comments index 24e159f8d89..897618373ee 100644 --- a/src/tests/keywords/comments +++ b/src/tests/keywords/comments @@ -13,7 +13,7 @@ #Nine comment (tabs and spaces, are you crazy?!) update { #}'{ Opening block with extra special chars {} '" - &control.User-Name := 'whatever' # do some random stuff + &control.User-Name := 'whatever' # do some random stuff } #{'} Closing block with extra special chars {} '" update { &request.Tmp-String-0 := 'candy' } # Comment after unicorn block diff --git a/src/tests/keywords/else-error b/src/tests/keywords/else-error index 2650ad010a6..82a99e510ba 100644 --- a/src/tests/keywords/else-error +++ b/src/tests/keywords/else-error @@ -7,6 +7,6 @@ if (1) { &control.Password.Cleartext := "fail" else { # ERROR - ok + ok } } diff --git a/src/tests/keywords/if-attr-error b/src/tests/keywords/if-attr-error index 82ebaf947c9..4c04a8b5f29 100644 --- a/src/tests/keywords/if-attr-error +++ b/src/tests/keywords/if-attr-error @@ -7,5 +7,5 @@ # attribute doesn't exist. # if (&Not-Dynamically-Allocated) { # ERROR - # foo + # foo } diff --git a/src/tests/keywords/if-empty-allow b/src/tests/keywords/if-empty-allow index 24a39de791e..44b9638b245 100644 --- a/src/tests/keywords/if-empty-allow +++ b/src/tests/keywords/if-empty-allow @@ -4,11 +4,11 @@ # Static if condition # if (1) { - # we allow empty 'if' conditions + # we allow empty 'if' conditions } if (0) { - # this never gets compiled + # this never gets compiled } diff --git a/src/tests/keywords/if-multiline b/src/tests/keywords/if-multiline index f311003c019..d2f5573fdb3 100644 --- a/src/tests/keywords/if-multiline +++ b/src/tests/keywords/if-multiline @@ -5,7 +5,7 @@ # we can magically have multiline "if" statements. # if (1 + 2 - != 3) { + != 3) { test_fail } success diff --git a/src/tests/keywords/join b/src/tests/keywords/join index 26bc129d297..f6ed97e47f2 100644 --- a/src/tests/keywords/join +++ b/src/tests/keywords/join @@ -4,9 +4,9 @@ &request -= &Packet-Type[*] &request += { - &Tmp-String-0 = "ab c" - &Tmp-String-0 = "de fg" - &Tmp-Integer-0 = 123 + &Tmp-String-0 = "ab c" + &Tmp-String-0 = "de fg" + &Tmp-Integer-0 = 123 } &control.Tmp-IP-Address-0 := 192.168.1.254 @@ -26,12 +26,12 @@ &control.Tmp-String-1 := "%(concat:%(join:%(ungroup:%{request[*]}) %{control.Tmp-IP-Address-0}) '. ')" if (&control.Tmp-String-1 != "bob. hello. ab c. de fg. 123. 192.168.1.254") { - test_fail + test_fail } &Tmp-String-2 := "%(concat:%(join:%{Tmp-String-0[*]} %{Tmp-Integer-0}) ,)" if (&request.Tmp-String-2 != "ab c,de fg,123") { - test_fail + test_fail } success diff --git a/src/tests/keywords/length b/src/tests/keywords/length index 30314f0f16a..dff5a1f60e8 100644 --- a/src/tests/keywords/length +++ b/src/tests/keywords/length @@ -2,20 +2,20 @@ # PRE: hex # &request += { - &Tmp-String-0 = '\ + &Tmp-String-0 = '\ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' - &Tmp-String-2 = '9870' - &Tmp-Octets-0 = 0x39383731 - &Tmp-IP-Address-0 = 57.56.55.50 - &Tmp-Integer-0 = 959985460 - &Tmp-Cast-IfId = '0000:0000:3938:3737' - &Tmp-Cast-IPv6Addr = '::3938:3738' + &Tmp-String-2 = '9870' + &Tmp-Octets-0 = 0x39383731 + &Tmp-IP-Address-0 = 57.56.55.50 + &Tmp-Integer-0 = 959985460 + &Tmp-Cast-IfId = '0000:0000:3938:3737' + &Tmp-Cast-IPv6Addr = '::3938:3738' &Tmp-Cast-IPv6Prefix = '::3938:3739/128' - &Tmp-Cast-Byte = 58 - &Tmp-Cast-Short = 14139 - &Tmp-Cast-Ether = 00:00:39:38:37:3c + &Tmp-Cast-Byte = 58 + &Tmp-Cast-Short = 14139 + &Tmp-Cast-Ether = 00:00:39:38:37:3c &Tmp-Cast-Integer64 = 1152921505566832445 &Tmp-Cast-IPv4Prefix = 57.56.55.62/32 } @@ -25,15 +25,15 @@ if (%(length:%{Tmp-String-0}) != 260) { } &request += { - &Tmp-uint64-0 = "%(length:%{Tmp-String-2})" # Tmp-Integer-0 is defined and used below for Tmp-Integer-4 - &Tmp-Integer-1 = "%(length:%{Tmp-Octets-0})" - &Tmp-Integer-2 = "%(length:%{Tmp-IP-Address-0})" - &Tmp-Integer-3 = "%(length:\"hello, world\")" - &Tmp-Integer-4 = "%(length:%{Tmp-Integer-0})" - &Tmp-Integer-6 = "%(length:%{Tmp-Cast-Ifid})" - &Tmp-Integer-7 = "%(length:%{Tmp-Cast-IPv6Addr})" - &Tmp-Integer-8 = "%(length:%{Tmp-Cast-IPv6Prefix})" - &Tmp-Integer-9 = "%(length:%{Tmp-Cast-Byte})" + &Tmp-uint64-0 = "%(length:%{Tmp-String-2})" # Tmp-Integer-0 is defined and used below for Tmp-Integer-4 + &Tmp-Integer-1 = "%(length:%{Tmp-Octets-0})" + &Tmp-Integer-2 = "%(length:%{Tmp-IP-Address-0})" + &Tmp-Integer-3 = "%(length:\"hello, world\")" + &Tmp-Integer-4 = "%(length:%{Tmp-Integer-0})" + &Tmp-Integer-6 = "%(length:%{Tmp-Cast-Ifid})" + &Tmp-Integer-7 = "%(length:%{Tmp-Cast-IPv6Addr})" + &Tmp-Integer-8 = "%(length:%{Tmp-Cast-IPv6Prefix})" + &Tmp-Integer-9 = "%(length:%{Tmp-Cast-Byte})" } # String - bin 0x39383730 @@ -81,10 +81,10 @@ if (&Tmp-Integer-9 != 1) { test_fail } -&Tmp-Integer-0 := "%(length:%{Tmp-Cast-Short})" -&Tmp-Integer-1 := "%(length:%{Tmp-Cast-Ether})" -&Tmp-Integer-2 := "%(length:%{Tmp-Cast-Integer64})" -&Tmp-Integer-3 := "%(length:%{Tmp-Cast-IPv4Prefix})" +&Tmp-Integer-0 := "%(length:%{Tmp-Cast-Short})" +&Tmp-Integer-1 := "%(length:%{Tmp-Cast-Ether})" +&Tmp-Integer-2 := "%(length:%{Tmp-Cast-Integer64})" +&Tmp-Integer-3 := "%(length:%{Tmp-Cast-IPv4Prefix})" # short - bin 0x373b if (&Tmp-Integer-0 != 2) { diff --git a/src/tests/keywords/load-balance b/src/tests/keywords/load-balance index 9f5e5e36c1a..863d06ebc0c 100644 --- a/src/tests/keywords/load-balance +++ b/src/tests/keywords/load-balance @@ -6,59 +6,59 @@ # Should distribute load between the modules. # &request += { - &Tmp-Integer-0 = 0 - &Tmp-Integer-1 = 0 + &Tmp-Integer-0 = 0 + &Tmp-Integer-1 = 0 - &Tmp-Integer-2 = 0 # 0 - &Tmp-Integer-2 = 1 - &Tmp-Integer-2 = 2 - &Tmp-Integer-2 = 3 - &Tmp-Integer-2 = 4 - &Tmp-Integer-2 = 5 - &Tmp-Integer-2 = 6 - &Tmp-Integer-2 = 7 - &Tmp-Integer-2 = 8 - &Tmp-Integer-2 = 9 # 10 - &Tmp-Integer-2 = 0 - &Tmp-Integer-2 = 1 - &Tmp-Integer-2 = 2 - &Tmp-Integer-2 = 3 - &Tmp-Integer-2 = 4 - &Tmp-Integer-2 = 5 - &Tmp-Integer-2 = 6 - &Tmp-Integer-2 = 7 - &Tmp-Integer-2 = 8 - &Tmp-Integer-2 = 9 # 20 - &Tmp-Integer-2 = 0 - &Tmp-Integer-2 = 1 - &Tmp-Integer-2 = 2 - &Tmp-Integer-2 = 3 - &Tmp-Integer-2 = 4 - &Tmp-Integer-2 = 5 - &Tmp-Integer-2 = 6 - &Tmp-Integer-2 = 7 - &Tmp-Integer-2 = 8 - &Tmp-Integer-2 = 9 # 30 - &Tmp-Integer-2 = 0 - &Tmp-Integer-2 = 1 - &Tmp-Integer-2 = 2 - &Tmp-Integer-2 = 3 - &Tmp-Integer-2 = 4 - &Tmp-Integer-2 = 5 - &Tmp-Integer-2 = 6 - &Tmp-Integer-2 = 7 - &Tmp-Integer-2 = 8 - &Tmp-Integer-2 = 9 # 40 - &Tmp-Integer-2 = 0 - &Tmp-Integer-2 = 1 - &Tmp-Integer-2 = 2 - &Tmp-Integer-2 = 3 - &Tmp-Integer-2 = 4 - &Tmp-Integer-2 = 5 - &Tmp-Integer-2 = 6 - &Tmp-Integer-2 = 7 - &Tmp-Integer-2 = 8 - &Tmp-Integer-2 = 9 # 49 + &Tmp-Integer-2 = 0 # 0 + &Tmp-Integer-2 = 1 + &Tmp-Integer-2 = 2 + &Tmp-Integer-2 = 3 + &Tmp-Integer-2 = 4 + &Tmp-Integer-2 = 5 + &Tmp-Integer-2 = 6 + &Tmp-Integer-2 = 7 + &Tmp-Integer-2 = 8 + &Tmp-Integer-2 = 9 # 10 + &Tmp-Integer-2 = 0 + &Tmp-Integer-2 = 1 + &Tmp-Integer-2 = 2 + &Tmp-Integer-2 = 3 + &Tmp-Integer-2 = 4 + &Tmp-Integer-2 = 5 + &Tmp-Integer-2 = 6 + &Tmp-Integer-2 = 7 + &Tmp-Integer-2 = 8 + &Tmp-Integer-2 = 9 # 20 + &Tmp-Integer-2 = 0 + &Tmp-Integer-2 = 1 + &Tmp-Integer-2 = 2 + &Tmp-Integer-2 = 3 + &Tmp-Integer-2 = 4 + &Tmp-Integer-2 = 5 + &Tmp-Integer-2 = 6 + &Tmp-Integer-2 = 7 + &Tmp-Integer-2 = 8 + &Tmp-Integer-2 = 9 # 30 + &Tmp-Integer-2 = 0 + &Tmp-Integer-2 = 1 + &Tmp-Integer-2 = 2 + &Tmp-Integer-2 = 3 + &Tmp-Integer-2 = 4 + &Tmp-Integer-2 = 5 + &Tmp-Integer-2 = 6 + &Tmp-Integer-2 = 7 + &Tmp-Integer-2 = 8 + &Tmp-Integer-2 = 9 # 40 + &Tmp-Integer-2 = 0 + &Tmp-Integer-2 = 1 + &Tmp-Integer-2 = 2 + &Tmp-Integer-2 = 3 + &Tmp-Integer-2 = 4 + &Tmp-Integer-2 = 5 + &Tmp-Integer-2 = 6 + &Tmp-Integer-2 = 7 + &Tmp-Integer-2 = 8 + &Tmp-Integer-2 = 9 # 49 } # diff --git a/src/tests/keywords/map-2arg-error b/src/tests/keywords/map-2arg-error index 53006379284..78f8d3fcba2 100644 --- a/src/tests/keywords/map-2arg-error +++ b/src/tests/keywords/map-2arg-error @@ -1,3 +1,3 @@ map foo { # ERROR - User-Name = 'foo' + User-Name = 'foo' } diff --git a/src/tests/keywords/map-field-error b/src/tests/keywords/map-field-error index 127521ebc09..91a35ca7804 100644 --- a/src/tests/keywords/map-field-error +++ b/src/tests/keywords/map-field-error @@ -2,5 +2,5 @@ # PRE: map-2arg-error map-empty-error map-module-error # map csv &User-Name { - reply.Filter-Id := 'field2' # ERROR + reply.Filter-Id := 'field2' # ERROR } diff --git a/src/tests/keywords/md4 b/src/tests/keywords/md4 index b6cef289bd6..30636ab3341 100644 --- a/src/tests/keywords/md4 +++ b/src/tests/keywords/md4 @@ -11,11 +11,11 @@ &request += { - &Tmp-Octets-1 = "%{md4:This is a string\n}" - &Tmp-Octets-2 = "%{md4:%{Tmp-String-0}}" - &Tmp-Octets-3 = "%{md4:%{request.Tmp-String-0}}" - &Tmp-Octets-4 = "%{md4:%{request.Tmp-Octets-0}}" - &Tmp-Octets-5 = "%{md4:%{Tmp-String-9}}" + &Tmp-Octets-1 = "%{md4:This is a string\n}" + &Tmp-Octets-2 = "%{md4:%{Tmp-String-0}}" + &Tmp-Octets-3 = "%{md4:%{request.Tmp-String-0}}" + &Tmp-Octets-4 = "%{md4:%{request.Tmp-Octets-0}}" + &Tmp-Octets-5 = "%{md4:%{Tmp-String-9}}" } # diff --git a/src/tests/keywords/md5 b/src/tests/keywords/md5 index fda682a5b62..72ef0a6c0d8 100644 --- a/src/tests/keywords/md5 +++ b/src/tests/keywords/md5 @@ -11,13 +11,13 @@ &request += { - &Tmp-Octets-1 = "%{md5:This is a string\n}" - &Tmp-Octets-2 = "%{md5:%{Tmp-String-0}}" - &Tmp-Octets-3 = "%{md5:%{request.Tmp-String-0}}" - &Tmp-Octets-4 = "%{md5:%{request.Tmp-Octets-0}}" - &Tmp-Octets-5 = "%{md5:%{Tmp-String-9}}" - &Tmp-Octets-6 = "%(hmacmd5:%{Tmp-String-1} %{Tmp-String-2})" - &Tmp-Octets-7 = "%(hmacmd5:%{Tmp-String-3} %{Tmp-String-3})" + &Tmp-Octets-1 = "%{md5:This is a string\n}" + &Tmp-Octets-2 = "%{md5:%{Tmp-String-0}}" + &Tmp-Octets-3 = "%{md5:%{request.Tmp-String-0}}" + &Tmp-Octets-4 = "%{md5:%{request.Tmp-Octets-0}}" + &Tmp-Octets-5 = "%{md5:%{Tmp-String-9}}" + &Tmp-Octets-6 = "%(hmacmd5:%{Tmp-String-1} %{Tmp-String-2})" + &Tmp-Octets-7 = "%(hmacmd5:%{Tmp-String-3} %{Tmp-String-3})" } # diff --git a/src/tests/keywords/mschap b/src/tests/keywords/mschap index 3bb2a9730f0..3b29af3f659 100644 --- a/src/tests/keywords/mschap +++ b/src/tests/keywords/mschap @@ -4,32 +4,32 @@ # MS CHAPv1 update request { - &User-Name := 'EXAMPLE\bob' + &User-Name := 'EXAMPLE\bob' &Vendor-Specific.Microsoft.CHAP-Challenge := 0xe96e4fff2955c4f1 &Vendor-Specific.Microsoft.CHAP-Response := 0x00010000000000000000000000000000000000000000000000008860bbaac0cd3960b4ce5dc6f0f7a462b897ef530484e80f } &request += { - &Tmp-Octets-0 = "%(mschap:Challenge)" - &Tmp-Octets-1 = "%(mschap:NT-Response)" - &Tmp-String-0 = "%(mschap:NT-Domain)" - &Tmp-String-1 = "%(mschap:User-Name)" + &Tmp-Octets-0 = "%(mschap:Challenge)" + &Tmp-Octets-1 = "%(mschap:NT-Response)" + &Tmp-String-0 = "%(mschap:NT-Domain)" + &Tmp-String-1 = "%(mschap:User-Name)" } if (&Tmp-Octets-0 != 0xe96e4fff2955c4f1) { - test_fail + test_fail } if (&Tmp-Octets-1 != 0x8860bbaac0cd3960b4ce5dc6f0f7a462b897ef530484e80f) { - test_fail + test_fail } if (&Tmp-String-0 != 'EXAMPLE') { - test_fail + test_fail } if (&Tmp-String-1 != 'bob') { - test_fail + test_fail } update request { @@ -37,62 +37,62 @@ update request { } update request { - &Tmp-Octets-0 := "%(mschap:LM-Response)" + &Tmp-Octets-0 := "%(mschap:LM-Response)" } if (&Tmp-Octets-0 != 0x6937d7935bb28a4c1dafe6a193bdea7a853a74d8bcf6db15) { - test_fail + test_fail } # Hashing update request { - &Tmp-Octets-0 := "%(mschap:NT-Hash testing_123)" - &Tmp-Octets-1 := "%(mschap:LM-Hash testing_123)" + &Tmp-Octets-0 := "%(mschap:NT-Hash testing_123)" + &Tmp-Octets-1 := "%(mschap:LM-Hash testing_123)" } if (&Tmp-Octets-0 != 0xfa782604f85eb3564f555648341b53e4) { - test_fail + test_fail } if (&Tmp-Octets-1 != 0x2d5545077d7b7d2ae4343f96ab15c596) { - test_fail + test_fail } # MS CHAPv2 update request { - &Vendor-Specific.Microsoft.CHAP-Response !* ANY - &Vendor-Specific.Microsoft.CHAP-Challenge := 0x04408dc2a98dae1ce351dfc53f57d08e - &Vendor-Specific.Microsoft.CHAP2-Response := 0x00010e93cfbfcef8d5b6af42d2b2ca5b43180000000000000000bc068d1e8c54de5e9db78e6736d686eb88a999dd7fa239b200 + &Vendor-Specific.Microsoft.CHAP-Response !* ANY + &Vendor-Specific.Microsoft.CHAP-Challenge := 0x04408dc2a98dae1ce351dfc53f57d08e + &Vendor-Specific.Microsoft.CHAP2-Response := 0x00010e93cfbfcef8d5b6af42d2b2ca5b43180000000000000000bc068d1e8c54de5e9db78e6736d686eb88a999dd7fa239b200 } update request { - &Tmp-Octets-0 := "%(mschap:Challenge)" - &Tmp-Octets-1 := "%(mschap:NT-Response)" + &Tmp-Octets-0 := "%(mschap:Challenge)" + &Tmp-Octets-1 := "%(mschap:NT-Response)" } if (&Tmp-Octets-0 != 0xad18b6b8e1478b4c) { - test_fail + test_fail } if (&Tmp-Octets-1 != 0xbc068d1e8c54de5e9db78e6736d686eb88a999dd7fa239b2) { - test_fail + test_fail } # Invalid update request { - &Vendor-Specific.Microsoft.CHAP-Challenge := 0xf0eac4151d5346662ba8c5e428 + &Vendor-Specific.Microsoft.CHAP-Challenge := 0xf0eac4151d5346662ba8c5e428 } update request { - &Tmp-String-0 := "%(mschap:Challenge)" + &Tmp-String-0 := "%(mschap:Challenge)" } if (&Tmp-String-0 != "") { - test_fail + test_fail } if (&Module-Failure-Message != "Invalid MS-CHAP challenge length") { - test_fail + test_fail } success \ No newline at end of file diff --git a/src/tests/keywords/nexttime b/src/tests/keywords/nexttime index 7b93dfc169b..1e995939952 100644 --- a/src/tests/keywords/nexttime +++ b/src/tests/keywords/nexttime @@ -11,7 +11,7 @@ # We have a fudge factor of 1 second either way if ((&Tmp-Integer-0 < 3599) || (&Tmp-Integer-0 > 3601)) { - test_fail + test_fail } # @@ -19,7 +19,7 @@ if ((&Tmp-Integer-0 < 3599) || (&Tmp-Integer-0 > 3601)) { # &Tmp-Integer-0 := "%{expr:%(nexttime:3d) - %(nexttime:1d)}" if ((&Tmp-Integer-0 < 172799) || (&Tmp-Integer-0 > 172801)) { - test_fail + test_fail } # @@ -27,7 +27,7 @@ if ((&Tmp-Integer-0 < 172799) || (&Tmp-Integer-0 > 172801)) { # &Tmp-Integer-0 := "%{expr:%(nexttime:4w) - %(nexttime:2w)}" if ((&Tmp-Integer-0 < 1209599) || (&Tmp-Integer-0 > 1209601)) { - test_fail + test_fail } success diff --git a/src/tests/keywords/redundant b/src/tests/keywords/redundant index f1c80178771..7ea82ffb9ae 100644 --- a/src/tests/keywords/redundant +++ b/src/tests/keywords/redundant @@ -67,7 +67,7 @@ foreach &Tmp-Integer-1 { } if (&Tmp-Integer-0 != "%{Tmp-Integer-1[#]}") { - test_fail + test_fail } success diff --git a/src/tests/keywords/return-section b/src/tests/keywords/return-section index ee59647328a..162a89dc091 100644 --- a/src/tests/keywords/return-section +++ b/src/tests/keywords/return-section @@ -15,7 +15,7 @@ if (&User-Name == "bob") { # Stop processing "authorize", and go to the next section. # return { # ERROR - ok = 1 + ok = 1 } # diff --git a/src/tests/keywords/unknown-update b/src/tests/keywords/unknown-update index 1403879a033..9b5c51f6e09 100644 --- a/src/tests/keywords/unknown-update +++ b/src/tests/keywords/unknown-update @@ -2,5 +2,5 @@ # PRE: update unknown # update control { - This-Does-Not-Exist = 1 # ERROR + This-Does-Not-Exist = 1 # ERROR } diff --git a/src/tests/keywords/update b/src/tests/keywords/update index 5618db8e288..ed7cbeb2bb2 100644 --- a/src/tests/keywords/update +++ b/src/tests/keywords/update @@ -1,5 +1,5 @@ update control { - &Password.Cleartext := 'hello' + &Password.Cleartext := 'hello' } success diff --git a/src/tests/keywords/update-array b/src/tests/keywords/update-array index 9810a3b703b..58ffdb0d378 100644 --- a/src/tests/keywords/update-array +++ b/src/tests/keywords/update-array @@ -3,9 +3,9 @@ # update request { - &Class := 0x01020304 - &Class += 0x05060708 - &Class += 0x090a0b0c + &Class := 0x01020304 + &Class += 0x05060708 + &Class += 0x090a0b0c } diff --git a/src/tests/keywords/update-delete b/src/tests/keywords/update-delete index 4aeb653a9da..5484f7e0cf5 100644 --- a/src/tests/keywords/update-delete +++ b/src/tests/keywords/update-delete @@ -19,8 +19,8 @@ update { # All attributes should now of been removed if ((&Tmp-String-0 && (&Tmp-String-0 == 'foobarbaz')) || \ - (&Tmp-Integer-0 && (&Tmp-Integer-0 == 123456789)) || \ - (&Tmp-IP-Address-0 && (&Tmp-IP-Address-0 == 192.0.2.1))) { + (&Tmp-Integer-0 && (&Tmp-Integer-0 == 123456789)) || \ + (&Tmp-IP-Address-0 && (&Tmp-IP-Address-0 == 192.0.2.1))) { test_fail } diff --git a/src/tests/keywords/update-exec-error b/src/tests/keywords/update-exec-error index 6d8f1fb215a..4ff2f8b9be4 100644 --- a/src/tests/keywords/update-exec-error +++ b/src/tests/keywords/update-exec-error @@ -6,5 +6,5 @@ # Malformed expansion should be a parse error. # update request { - &Tmp-String-0 = `/bin/sh -c %{User-Name` # ERROR + &Tmp-String-0 = `/bin/sh -c %{User-Name` # ERROR } diff --git a/src/tests/keywords/update-group-error b/src/tests/keywords/update-group-error index 41852a64fbe..c76d11f0fac 100644 --- a/src/tests/keywords/update-group-error +++ b/src/tests/keywords/update-group-error @@ -2,12 +2,12 @@ # PRE: update # update reply { - &Tmp-String-0 := "foo" + &Tmp-String-0 := "foo" - # - # This is a string, so it's NOT allowed. - # - &Tmp-String-1 := { + # + # This is a string, so it's NOT allowed. + # + &Tmp-String-1 := { Tmp-String-2 := "1.0" # ERROR - } + } } diff --git a/src/tests/keywords/update-remove-index b/src/tests/keywords/update-remove-index index c07883c153b..bf050f3e8b6 100644 --- a/src/tests/keywords/update-remove-index +++ b/src/tests/keywords/update-remove-index @@ -22,10 +22,10 @@ debug_request # Only the 1st, 2nd, 3rd and 5th Tmp-IP-Address attributes should still be in the list if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.1') || \ - ("%{Tmp-IP-Address-0[1]}" != '192.0.2.2') || \ - ("%{Tmp-IP-Address-0[2]}" != '192.0.2.3') || \ - ("%{Tmp-IP-Address-0[3]}" != '192.0.2.4') || \ - ("%{Tmp-IP-Address-0[4]}" != '')) { + ("%{Tmp-IP-Address-0[1]}" != '192.0.2.2') || \ + ("%{Tmp-IP-Address-0[2]}" != '192.0.2.3') || \ + ("%{Tmp-IP-Address-0[3]}" != '192.0.2.4') || \ + ("%{Tmp-IP-Address-0[4]}" != '')) { test_fail } @@ -36,10 +36,10 @@ update request { # Should be the same as the previous result if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.1') || \ - ("%{Tmp-IP-Address-0[1]}" != '192.0.2.2') || \ - ("%{Tmp-IP-Address-0[2]}" != '192.0.2.3') || \ - ("%{Tmp-IP-Address-0[3]}" != '192.0.2.4') || \ - ("%{Tmp-IP-Address-0[4]}" != '')) { + ("%{Tmp-IP-Address-0[1]}" != '192.0.2.2') || \ + ("%{Tmp-IP-Address-0[2]}" != '192.0.2.3') || \ + ("%{Tmp-IP-Address-0[3]}" != '192.0.2.4') || \ + ("%{Tmp-IP-Address-0[4]}" != '')) { test_fail } @@ -50,9 +50,9 @@ update request { # IP address at index 0 should be removed if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ - ("%{Tmp-IP-Address-0[1]}" != '192.0.2.3') || \ - ("%{Tmp-IP-Address-0[2]}" != '192.0.2.4') || \ - ("%{Tmp-IP-Address-0[3]}" != '')) { + ("%{Tmp-IP-Address-0[1]}" != '192.0.2.3') || \ + ("%{Tmp-IP-Address-0[2]}" != '192.0.2.4') || \ + ("%{Tmp-IP-Address-0[3]}" != '')) { test_fail } @@ -63,9 +63,9 @@ update request { # Should be the same as the previous result if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ - ("%{Tmp-IP-Address-0[1]}" != '192.0.2.3') || \ - ("%{Tmp-IP-Address-0[2]}" != '192.0.2.4') || \ - ("%{Tmp-IP-Address-0[3]}" != '')) { + ("%{Tmp-IP-Address-0[1]}" != '192.0.2.3') || \ + ("%{Tmp-IP-Address-0[2]}" != '192.0.2.4') || \ + ("%{Tmp-IP-Address-0[3]}" != '')) { test_fail } diff --git a/src/tests/keywords/update-remove-list b/src/tests/keywords/update-remove-list index 4aeb653a9da..5484f7e0cf5 100644 --- a/src/tests/keywords/update-remove-list +++ b/src/tests/keywords/update-remove-list @@ -19,8 +19,8 @@ update { # All attributes should now of been removed if ((&Tmp-String-0 && (&Tmp-String-0 == 'foobarbaz')) || \ - (&Tmp-Integer-0 && (&Tmp-Integer-0 == 123456789)) || \ - (&Tmp-IP-Address-0 && (&Tmp-IP-Address-0 == 192.0.2.1))) { + (&Tmp-Integer-0 && (&Tmp-Integer-0 == 123456789)) || \ + (&Tmp-IP-Address-0 && (&Tmp-IP-Address-0 == 192.0.2.1))) { test_fail } diff --git a/src/tests/keywords/update-remove-value b/src/tests/keywords/update-remove-value index 65813d0e78f..a24b5de2ce5 100644 --- a/src/tests/keywords/update-remove-value +++ b/src/tests/keywords/update-remove-value @@ -14,9 +14,9 @@ update { } if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || \ - ("%{Tmp-IP-Address-0[1]}" != 192.0.2.2) || \ - ("%{Tmp-IP-Address-0[2]}" != 192.0.2.3) || \ - ("%{Tmp-IP-Address-0[3]}" != 192.0.2.4)) { + ("%{Tmp-IP-Address-0[1]}" != 192.0.2.2) || \ + ("%{Tmp-IP-Address-0[2]}" != 192.0.2.3) || \ + ("%{Tmp-IP-Address-0[3]}" != 192.0.2.4)) { test_fail } @@ -27,9 +27,9 @@ update { # Only the 2nd, 3rd and 4th Tmp-IP-Address attributes should still be in the list if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ - ("%{Tmp-IP-Address-0[1]}" != '192.0.2.3') || \ - ("%{Tmp-IP-Address-0[2]}" != '192.0.2.4') || \ - ("%{Tmp-IP-Address-0[3]}" != '')) { + ("%{Tmp-IP-Address-0[1]}" != '192.0.2.3') || \ + ("%{Tmp-IP-Address-0[2]}" != '192.0.2.4') || \ + ("%{Tmp-IP-Address-0[3]}" != '')) { test_fail } @@ -40,8 +40,8 @@ update { # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ - ("%{Tmp-IP-Address-0[1]}" != '192.0.2.4') || \ - ("%{Tmp-IP-Address-0[2]}" != '')) { + ("%{Tmp-IP-Address-0[1]}" != '192.0.2.4') || \ + ("%{Tmp-IP-Address-0[2]}" != '')) { test_fail } @@ -52,8 +52,8 @@ update { # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ - ("%{Tmp-IP-Address-0[1]}" != '192.0.2.4') || \ - ("%{Tmp-IP-Address-0[2]}" != '')) { + ("%{Tmp-IP-Address-0[1]}" != '192.0.2.4') || \ + ("%{Tmp-IP-Address-0[2]}" != '')) { test_fail } @@ -69,7 +69,7 @@ update { # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ - ("%{Tmp-IP-Address-0[1]}" != '')) { + ("%{Tmp-IP-Address-0[1]}" != '')) { test_fail } diff --git a/src/tests/keywords/xlat-config b/src/tests/keywords/xlat-config index 2fa7e4ed4cd..45ab1a41c97 100644 --- a/src/tests/keywords/xlat-config +++ b/src/tests/keywords/xlat-config @@ -4,13 +4,13 @@ &Tmp-String-0 := "%(config:modules.test.boolean)" if (&Tmp-String-0 != "no") { - test_fail + test_fail } &Tmp-String-0 := "test" &Tmp-Integer-0 := "%(config:modules.%{Tmp-String-0}.integer)" if (&Tmp-Integer-0 != 1) { - test_fail + test_fail } success \ No newline at end of file diff --git a/src/tests/keywords/xlat-dhcpv4 b/src/tests/keywords/xlat-dhcpv4 index 79d173463ec..e4c218cbeb3 100644 --- a/src/tests/keywords/xlat-dhcpv4 +++ b/src/tests/keywords/xlat-dhcpv4 @@ -4,22 +4,22 @@ &Tmp-Octets-0 := 0x520d0103abcdef0206010203040506 if ("%(decode.dhcpv4:%{Tmp-Octets-0})" != 2) { - test_fail + test_fail } debug_request if ( &Relay-Agent-Information.Circuit-Id != 0xabcdef ) { - test_fail + test_fail } if ( &Relay-Agent-Information.Remote-Id != 0x010203040506 ) { - test_fail + test_fail } &Tmp-Octets-1 := "%(encode.dhcpv4:&request[*])" if ( &Tmp-Octets-1 != 0x520d0103abcdef0206010203040506 ) { - test_fail + test_fail } debug_control diff --git a/src/tests/keywords/xlat-exec b/src/tests/keywords/xlat-exec index 055cd240242..f203806e03e 100644 --- a/src/tests/keywords/xlat-exec +++ b/src/tests/keywords/xlat-exec @@ -1,8 +1,8 @@ -update control { +update control { &Tmp-String-0 = "foo" } -update control { +update control { &Tmp-String-1 := `/bin/echo hello 1234:%{control.Tmp-String-0} world` } @@ -10,7 +10,7 @@ if (&control.Tmp-String-1 != "hello 1234:foo world") { test_fail } -update control { +update control { &Tmp-String-1 := `/bin/echo hello %{control.Tmp-String-0}:1234 world` } diff --git a/src/tests/keywords/xlat-integer b/src/tests/keywords/xlat-integer index 1194ed2b252..65140e72b2b 100644 --- a/src/tests/keywords/xlat-integer +++ b/src/tests/keywords/xlat-integer @@ -2,21 +2,21 @@ # PRE: update # update request { - &Tmp-String-0 := '9870' - &Tmp-String-1 := '98709870' - &Tmp-String-2 := '184467440737095516157' - &Tmp-Octets-0 := 0x39383731 - &Tmp-Octets-1 := 0x3938373139383731 - &Tmp-Octets-2 := 0x393837313938373139383731 - &Tmp-IP-Address-0 := 57.56.55.50 - &Tmp-Date-0 := 959985459 - &Tmp-Integer-0 := 959985460 - &Tmp-Cast-IfId := '0000:0000:3938:3737' - &Tmp-Cast-IPv6Addr := '::3938:3738' + &Tmp-String-0 := '9870' + &Tmp-String-1 := '98709870' + &Tmp-String-2 := '184467440737095516157' + &Tmp-Octets-0 := 0x39383731 + &Tmp-Octets-1 := 0x3938373139383731 + &Tmp-Octets-2 := 0x393837313938373139383731 + &Tmp-IP-Address-0 := 57.56.55.50 + &Tmp-Date-0 := 959985459 + &Tmp-Integer-0 := 959985460 + &Tmp-Cast-IfId := '0000:0000:3938:3737' + &Tmp-Cast-IPv6Addr := '::3938:3738' &Tmp-Cast-IPv6Prefix := '::3938:3739/128' - &Tmp-Cast-Byte := 58 - &Tmp-Cast-Short := 14139 - &Tmp-Cast-Ether := 00:00:39:38:37:3c + &Tmp-Cast-Byte := 58 + &Tmp-Cast-Short := 14139 + &Tmp-Cast-Ether := 00:00:39:38:37:3c &Tmp-Cast-Integer64 := 1152921505566832445 &Tmp-Cast-IPv4Prefix := 57.56.55.62/32 } @@ -79,12 +79,12 @@ if ("%(integer:%{Tmp-Octets-2})") { } update request { - &Tmp-String-2 := "%(integer:%{Tmp-IP-Address-0})" - &Tmp-String-3 := "%(integer:%{Tmp-Date-0})" - &Tmp-String-4 := "%(integer:%{Tmp-Integer-0})" - &Tmp-String-6 := "%(integer:%{Tmp-Cast-Ifid})" - &Tmp-String-7 := "%(integer:%{Tmp-Cast-IPv6Addr})" - &Tmp-String-8 := "%(integer:%{Tmp-Cast-IPv6Prefix})" + &Tmp-String-2 := "%(integer:%{Tmp-IP-Address-0})" + &Tmp-String-3 := "%(integer:%{Tmp-Date-0})" + &Tmp-String-4 := "%(integer:%{Tmp-Integer-0})" + &Tmp-String-6 := "%(integer:%{Tmp-Cast-Ifid})" + &Tmp-String-7 := "%(integer:%{Tmp-Cast-IPv6Addr})" + &Tmp-String-8 := "%(integer:%{Tmp-Cast-IPv6Prefix})" } # IP Address @@ -121,11 +121,11 @@ if (&Tmp-String-8 != '959985465') { test_fail } update request { - &Tmp-String-0 := "%(integer:%{Tmp-Cast-Byte})" - &Tmp-String-1 := "%(integer:%{Tmp-Cast-Short})" - &Tmp-uint64-2 := "%(integer:%{Tmp-Cast-Ether})" - &Tmp-String-3 := "%(integer:%{Tmp-Cast-Integer64})" - &Tmp-String-4 := "%(integer:%{Tmp-Cast-IPv4Prefix})" + &Tmp-String-0 := "%(integer:%{Tmp-Cast-Byte})" + &Tmp-String-1 := "%(integer:%{Tmp-Cast-Short})" + &Tmp-uint64-2 := "%(integer:%{Tmp-Cast-Ether})" + &Tmp-String-3 := "%(integer:%{Tmp-Cast-Integer64})" + &Tmp-String-4 := "%(integer:%{Tmp-Cast-IPv4Prefix})" } # byte diff --git a/src/tests/keywords/xlat-interpreter b/src/tests/keywords/xlat-interpreter index d43977ce9fa..50f7bcfc78d 100644 --- a/src/tests/keywords/xlat-interpreter +++ b/src/tests/keywords/xlat-interpreter @@ -6,26 +6,26 @@ # update request { - &Tmp-String-0 := "%(interpreter:.filename)" - &Tmp-Integer-0 := "%(interpreter:.line)" - &Tmp-String-1 := "%(interpreter:.name)" - &Tmp-String-2 := "%(interpreter:.type)" + &Tmp-String-0 := "%(interpreter:.filename)" + &Tmp-Integer-0 := "%(interpreter:.line)" + &Tmp-String-1 := "%(interpreter:.name)" + &Tmp-String-2 := "%(interpreter:.type)" } if (&Tmp-String-0 != "src/tests/keywords/xlat-interpreter") { - test_fail + test_fail } if (&Tmp-String-1 != "request") { - test_fail + test_fail } if (&Tmp-String-2 != "update") { - test_fail + test_fail } if (&Tmp-Integer-0 != 8) { - test_fail + test_fail } success diff --git a/src/tests/keywords/xlat-soh b/src/tests/keywords/xlat-soh index 7e85dff6554..b43f3ca9ba3 100644 --- a/src/tests/keywords/xlat-soh +++ b/src/tests/keywords/xlat-soh @@ -3,83 +3,83 @@ # update control { - &Tmp-String-0 := %(soh:OS) + &Tmp-String-0 := %(soh:OS) } # SoH-Supported not set - should be no response if ("%{control.Tmp-String-0}" != "") { - test_fail + test_fail } update request { - &SoH-Supported := yes - &SoH-MS-Machine-OS-release := 0 - &SoH-MS-Machine-OS-build := 6001 - &SoH-MS-Machine-SP-version := 1 - &SoH-MS-Machine-SP-release := 0 + &SoH-Supported := yes + &SoH-MS-Machine-OS-release := 0 + &SoH-MS-Machine-OS-build := 6001 + &SoH-MS-Machine-SP-version := 1 + &SoH-MS-Machine-SP-release := 0 } update control { - &Tmp-String-0 := %(soh:OS) + &Tmp-String-0 := %(soh:OS) } # SoH-MS-Machine-OS-vendor not set - should be no response if ("%{control.Tmp-String-0}" != "") { - test_fail + test_fail } update request { - &SoH-Supported := yes - &SoH-MS-Machine-OS-vendor := Microsoft + &SoH-Supported := yes + &SoH-MS-Machine-OS-vendor := Microsoft } update control { - &Tmp-String-0 := %(soh:OS) + &Tmp-String-0 := %(soh:OS) } # OS version not set if ("%{control.Tmp-String-0}" != "Windows unknown") { - test_fail + test_fail } update request { - &SoH-MS-Machine-OS-version := 6 + &SoH-MS-Machine-OS-version := 6 } update control { - &Tmp-String-0 := %(soh:OS) + &Tmp-String-0 := %(soh:OS) } # Complete set of data should match a real version of Windows if ("%{control.Tmp-String-0}" != "Windows Vista / Server 2008 6.0.6001 sp 1.0" ) { - test_fail + test_fail } update request { - &SoH-MS-Machine-OS-release := 5 + &SoH-MS-Machine-OS-release := 5 } update control { - &Tmp-String-0 := %(soh:OS) + &Tmp-String-0 := %(soh:OS) } # Version and Release combination that does not exist if ("%{control.Tmp-String-0}" != "Windows Other 6.5.6001 sp 1.0") { - test_fail + test_fail } update request { - &SoH-MS-Machine-OS-version := 8 - &SoH-MS-Machine-OS-release := 0 + &SoH-MS-Machine-OS-version := 8 + &SoH-MS-Machine-OS-release := 0 } update control { - &Tmp-String-0 := %(soh:OS) + &Tmp-String-0 := %(soh:OS) } # Version that does not exist if ("%{control.Tmp-String-0}" != "Windows Other 8.0.6001 sp 1.0") { - test_fail + test_fail } debug_control