| 1 | > |
| 2 | > # These expansions can test variables in the configuration, but as there |
| 3 | > # is no message being processed, there is no message-related data. But |
| 4 | > # that of course gets tested in plenty of other places. |
| 5 | > |
| 6 | > # Some fixed variables |
| 7 | > |
| 8 | > exim_path: TESTSUITE/eximdir/exim |
| 9 | > exim_version: x.yz |
| 10 | > config_dir: TESTSUITE |
| 11 | > config_file: TESTSUITE/test-config |
| 12 | > primary_hostname: myhost.test.ex |
| 13 | > primary_hostname: myhost.test.ex |
| 14 | > qualify_domain: myhost.test.ex |
| 15 | > bounce_return_size_limit: 102400 |
| 16 | > spool_directory: TESTSUITE/spool |
| 17 | > Failed: unknown variable in "${unknown}" |
| 18 | > h_subject: (should be empty) |
| 19 | > h_subject: (should be empty) |
| 20 | > Failed: unknown expansion operator "header_subject" |
| 21 | > |
| 22 | > # $message_headers should be empty |
| 23 | > message_headers: >< |
| 24 | > |
| 25 | > # Continuation |
| 26 | > xy |
| 27 | > xy |
| 28 | > |
| 29 | > # Overlong names and overbig numbers |
| 30 | > |
| 31 | > Failed: unknown variable name "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" |
| 32 | > Failed: unknown variable in "${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}" |
| 33 | > + |
| 34 | > + |
| 35 | > |
| 36 | > # List operations |
| 37 | > |
| 38 | > filter: "a:b:c" |
| 39 | > filter: a:c |
| 40 | > filter: a'c |
| 41 | > filter: ''a' ''c |
| 42 | > filter: "" |
| 43 | > |
| 44 | > map: "" |
| 45 | > map: a:b:c |
| 46 | > map: ::a::: ::b::: ::c:: |
| 47 | > map: fail string |
| 48 | > map: []:[b]:[c] |
| 49 | > |
| 50 | > reduce: "+" |
| 51 | > reduce: +abc |
| 52 | > reduce: 6 |
| 53 | > reduce: 9 |
| 54 | > |
| 55 | > listnamed: *.aa.bb : ^\Nxxx(.*) |
| 56 | > listnamed: *.aa.bb : ^\Nxxx(.*) |
| 57 | > listnamed: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch |
| 58 | > listnamed: *.aa.bb : ^\Nxxx(.*) : ;; |
| 59 | > listnamed: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664 |
| 60 | > Failed: "nolist" is not a named list |
| 61 | > listnamed: *.aa.bb : ^\Nxxx(.*) |
| 62 | > Failed: "hlist" is not a domain named list |
| 63 | > Failed: bad suffix on "list" operator |
| 64 | > |
| 65 | > listcount: 3 |
| 66 | > listcount: 0 |
| 67 | > listcount: 3 |
| 68 | > listcount: 2 |
| 69 | > |
| 70 | > listextract: b |
| 71 | > listextract: XcX |
| 72 | > listextract: |
| 73 | > listextract: |
| 74 | > listextract: fail |
| 75 | > Failed: "listextract" failed and "fail" requested |
| 76 | > |
| 77 | > sort: 1:2:3:4 |
| 78 | > sort: 4,3,2,1 |
| 79 | > sort: a:aa:B:c |
| 80 | > sort: 10 smtp.ex.com:100 r2.ex.com:666 r99.ex.com |
| 81 | > sort: 10,smtp.ex.com:100,r2.ex.com:666,r99.ex.com |
| 82 | > sort: "" |
| 83 | > |
| 84 | > # Tests with iscntrl() and illegal separators |
| 85 | > |
| 86 | > map: 'a' |
| 87 | '' |
| 88 | 'b' |
| 89 | 'c' |
| 90 | > |
| 91 | > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item |
| 92 | > reduce: 6 |
| 93 | > reduce: 6 |
| 94 | > reduce: 6 |
| 95 | > |
| 96 | > # Operators |
| 97 | > |
| 98 | > Failed: missing or misplaced { or } |
| 99 | > Failed: missing or misplaced { or } |
| 100 | > Failed: error from acl "a_nosuch" |
| 101 | > acl: (0) [] [] |
| 102 | > acl: (1) [person@dom.ain] [] |
| 103 | > acl: (2) [firstarg] [secondarg] |
| 104 | > acl: (1) [arg with spaces] [] |
| 105 | > acl: |
| 106 | > acl: |
| 107 | > acl: (0) [] [] |
| 108 | > acl: (1) [person@dom.ain] [] |
| 109 | > Failed: error from acl "a_defer" |
| 110 | > acl: (2) [new arg1] [top_arg_1] |
| 111 | > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] [] |
| 112 | > |
| 113 | > addrss: local-part@dom.ain |
| 114 | > addrss: local-part@dom.ain |
| 115 | > domain: dom.ain |
| 116 | > domain: dom.ain |
| 117 | > |
| 118 | > addresses: ''abc@xyz' ''pqr@xyz |
| 119 | > addresses: local-part@dom.ain |
| 120 | > addresses: local-part@dom.ain+xyz@abc |
| 121 | > addresses: local-part@dom.ain:xyz@abc:p@q:r@s |
| 122 | > addresses: |
| 123 | > |
| 124 | > escape: B7\267F2\362 |
| 125 | > eval: 2 |
| 126 | > eval: 7 |
| 127 | > eval: 9 |
| 128 | > eval: 4 |
| 129 | > eval: 6 |
| 130 | > eval: 42 |
| 131 | > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "") |
| 132 | > eval: -2 |
| 133 | > eval: 1 |
| 134 | > eval: 1 |
| 135 | > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3") |
| 136 | > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3") |
| 137 | > eval: 1 |
| 138 | > eval: -5 |
| 139 | > eval: 1 |
| 140 | > eval: 40962 |
| 141 | > eval: 63 |
| 142 | > Failed: error in expression evaluation: expecting operator (after processing "0") |
| 143 | > eval10: 77 |
| 144 | > eval10: 8 |
| 145 | > Failed: error in expression evaluation: expecting operator (after processing "0") |
| 146 | > eval: 4 |
| 147 | > eval: 4 |
| 148 | > eval: 4 |
| 149 | > eval: 13 |
| 150 | > eval: 9 |
| 151 | > eval: 6 |
| 152 | > eval: 3 |
| 153 | > eval: 0 |
| 154 | > eval: 24 |
| 155 | > eval: 4608 |
| 156 | > eval: 4608 |
| 157 | > eval: -4608 |
| 158 | > |
| 159 | > expand: $primary_hostname myhost.test.ex |
| 160 | > hash: jmg monty fbWx |
| 161 | > hash: abcX abX aX X |
| 162 | > hex2b64:EjRWeA== |
| 163 | > hex2b64:q83v |
| 164 | > hex2b64:q83v |
| 165 | > hex2b64:Gis8TV5v |
| 166 | > Failed: "1a2b3c4d5e6" contains an odd number of characters |
| 167 | > Failed: "1a2b3c4d5e6g" is not a hex string |
| 168 | > hex2b64:MPPJPkZDbetYunCBao7BJA== |
| 169 | > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE= |
| 170 | > |
| 171 | > base32: 0 <> |
| 172 | > base32: 1 <b> |
| 173 | > base32: 31 <7> |
| 174 | > base32: 32 <ba> |
| 175 | > base32: 42 <bk> |
| 176 | > Failed: argument for base32 operator is "0x1", which is not a decimal number |
| 177 | > |
| 178 | > base32d: 0 0 |
| 179 | > base32d: 1 1 |
| 180 | > base32d: 31 31 |
| 181 | > base32d: 32 32 |
| 182 | > base32d: 42 42 |
| 183 | > Failed: argument for base32d operator is "ABC", which is not a base 32 number |
| 184 | > |
| 185 | > The base62 operator is actually a base36 operator in the Darwin and Cygwin |
| 186 | > environments. Write cunning tests that produce the same output in both cases, |
| 187 | > while doing a reasonable check. |
| 188 | > |
| 189 | > base62: OK |
| 190 | > base62d: OK |
| 191 | > base62d: OK |
| 192 | > Failed: argument for base62 operator is "12345x", which is not a decimal number |
| 193 | > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number |
| 194 | > |
| 195 | > hmac: dd97e3ba5d1a61b5006108f8c8252953 |
| 196 | > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064 |
| 197 | > md5: 77add1d5f41223d5582fca736a5cb335 |
| 198 | > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709 |
| 199 | > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D |
| 200 | > mask: 192.168.10.192/28 |
| 201 | > mask: 192.168.10.206/32 |
| 202 | > Failed: mask value too big in "192.168.10.206/33" |
| 203 | > mask: 0.0.0.0/0 |
| 204 | > Failed: missing mask value in "192.168.10.206" |
| 205 | > Failed: "a.b.c.d" is not an IP address |
| 206 | > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001 |
| 207 | > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001 |
| 208 | > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001 |
| 209 | > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001 |
| 210 | > ipv6norm: ::1 |
| 211 | > ipv6norm: 2a00:: |
| 212 | > ipv6norm: 2a00::1 |
| 213 | > ipv6norm: 2a00:eadf::1:0 |
| 214 | > ipv6norm: 2a00:eadf:0:1:: |
| 215 | > ipv6norm: 2a00:: |
| 216 | > ipv6norm: 2a00:2:3:4:5:6:7:8 |
| 217 | > nhash: 19 0/61 |
| 218 | > lc/uc: the quick BROWN FOX |
| 219 | > length: The quick abc |
| 220 | > lclpt: local-part |
| 221 | > lclpt: local-part |
| 222 | > quote: aZ09_.-Q "ab*cd" "abcd\"ef" |
| 223 | > quote: "nl(\n)" |
| 224 | > quote: "cr(\r)" |
| 225 | > quote: "tab( )" |
| 226 |