@@ -29,73 +29,73 @@ test_int64 = 1152921505566832445
2929test_ipv4prefix = 57.56.55.62/32
3030
3131# String - bin 0x39383730
32- test_output := %base64.encode(%{ test_string} )
32+ test_output := %base64.encode(test_string)
3333if (!(test_output == 'OTg3MA==')) {
3434 test_fail
3535}
3636
3737# Octets - bin 0x39383731
38- test_output := %base64.encode(%{ test_octets} )
38+ test_output := %base64.encode(test_octets)
3939if (!(test_output == 'OTg3MQ==')) {
4040 test_fail
4141}
4242
4343# IP Address - bin 0x39383732
44- test_output := %base64.encode(%{ test_ipaddr} )
44+ test_output := %base64.encode(test_ipaddr)
4545if (!(test_output == 'OTg3Mg==')) {
4646 test_fail
4747}
4848
4949# Integer - bin 0x39383734
50- test_output := %base64.encode(%{ test_int} )
50+ test_output := %base64.encode(test_int)
5151if (!(test_output == 'OTg3NA==')) {
5252 test_fail
5353}
5454
5555# ifid - bin 0x0000000039383737
56- test_output := %base64.encode(%{ test_ifid} )
56+ test_output := %base64.encode(test_ifid)
5757if (!(test_output == 'AAAAADk4Nzc=')) {
5858 test_fail
5959}
6060
6161# ipv6addr - bin 0x00000000000000000000000039383738
62- test_output := %base64.encode(%{ test_ipv6addr} )
62+ test_output := %base64.encode(test_ipv6addr)
6363if (!(test_output == 'AAAAAAAAAAAAAAAAOTg3OA==')) {
6464 test_fail
6565}
6666
6767# ipv6addrprefix - bin 0x008000000000000000000000000039383739
68- test_output := %base64.encode(%{ test_ipv6prefix} )
68+ test_output := %base64.encode(test_ipv6prefix)
6969if (!(test_output == 'AIAAAAAAAAAAAAAAAAA5ODc5')) {
7070 test_fail
7171}
7272
7373# byte - bin 0x3a
74- test_output := %base64.encode(%{ test_byte} )
74+ test_output := %base64.encode(test_byte)
7575if (!(test_output == 'Og==')) {
7676 test_fail
7777}
7878
7979# short - bin 0x373b
80- test_output := %base64.encode(%{ test_short} )
80+ test_output := %base64.encode(test_short)
8181if (!(test_output == 'Nzs=')) {
8282 test_fail
8383}
8484
8585# ethernet - bin 0x00003938373c
86- test_output := %base64.encode(%{ test_ether} )
86+ test_output := %base64.encode(test_ether)
8787if (!(test_output == 'AAA5ODc8')) {
8888 test_fail
8989}
9090
9191# integer64 - bin 0x100000003938373d
92- test_output := %base64.encode(%{ test_int64} )
92+ test_output := %base64.encode(test_int64)
9393if (!(test_output == 'EAAAADk4Nz0=')) {
9494 test_fail
9595}
9696
9797# ipv4prefix - bin 0x203938373e
98- test_output := %base64.encode(%{ test_ipv4prefix} )
98+ test_output := %base64.encode(test_ipv4prefix)
9999if (!(test_output == 'IDk4Nz4=')) {
100100 test_fail
101101}
@@ -107,25 +107,25 @@ if (!(test_output == 'IDk4Nz4=')) {
107107#}
108108
109109# Regression test, this used to crash...
110- test_octets := %base64.decode(Zm9v)
110+ test_octets := %base64.decode(' Zm9v' )
111111if (!(test_octets == "foo")) {
112112 debug_request
113113 test_fail
114114}
115115
116- test_octets := %base64.decode(AIAAAAAAAAAAAAAAAAA5ODc5)
116+ test_octets := %base64.decode(' AIAAAAAAAAAAAAAAAAA5ODc5' )
117117if (!(test_octets == 0x008000000000000000000000000039383739)) {
118118 test_fail
119119}
120120
121121# Regression tests
122- test_octets := %base64.decode(5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK)
122+ test_octets := %base64.decode(' 5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK' )
123123
124124if (!(test_octets == 0xe5136a365f2260b6e409cec9851f1ab384ed0c3097ea8b6eb96b5c8daf2b213532c7dceb9c749ef6d4c71a628a)) {
125125 test_fail
126126}
127127
128- test_octets := %base64.decode(eHfXPKZ+2iv9cnMV1MOmE/moYYA1Uk5xTmw4aVlMYmtDYzdKaFI4YXM0VHRERENYNm90dXVXdGNqYThySVRVeXg5enJuSFNlOXRUSEdtS0s=)
128+ test_octets := %base64.decode(' eHfXPKZ+2iv9cnMV1MOmE/moYYA1Uk5xTmw4aVlMYmtDYzdKaFI4YXM0VHRERENYNm90dXVXdGNqYThySVRVeXg5enJuSFNlOXRUSEdtS0s=' )
129129
130130if (!(test_octets == 0x7877d73ca67eda2bfd727315d4c3a613f9a8618035524e714e6c3869594c626b4363374a685238617334547444444358366f7475755774636a6138724954557978397a726e48536539745448476d4b4b)) {
131131 test_fail
0 commit comments