Commit | Line | Data |
---|---|---|
54c5ebb1 PH |
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 | |
71224040 | 9 | > exim_version: x.yz |
98b8312f HSHR |
10 | > config_dir: TESTSUITE |
11 | > config_file: TESTSUITE/test-config | |
54c5ebb1 PH |
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 | > | |
29f89cad PH |
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 | > | |
a64a3dfa JH |
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 | |
042eb971 | 60 | > Failed: "nolist" is not a named list |
a64a3dfa | 61 | > listnamed: *.aa.bb : ^\Nxxx(.*) |
042eb971 JH |
62 | > Failed: "hlist" is not a domain named list |
63 | > Failed: bad suffix on "list" operator | |
64 | > | |
a64a3dfa JH |
65 | > listcount: 3 |
66 | > listcount: 0 | |
67 | > listcount: 3 | |
68 | > listcount: 2 | |
042eb971 | 69 | > |
aa26e137 JH |
70 | > listextract: b |
71 | > listextract: XcX | |
72 | > listextract: | |
73 | > listextract: | |
74 | > listextract: fail | |
f90d49f7 | 75 | > Failed: "listextract" failed and "fail" requested |
aa26e137 | 76 | > |
ac4ef9bd JH |
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 | > | |
ec95d1a6 PH |
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 | > | |
54c5ebb1 PH |
96 | > # Operators |
97 | > | |
723c72e6 JH |
98 | > Failed: missing or misplaced { or } |
99 | > Failed: missing or misplaced { or } | |
bef3ea7f | 100 | > Failed: error from acl "a_nosuch" |
525239c1 JH |
101 | > acl: (0) [] [] |
102 | > acl: (1) [person@dom.ain] [] | |
103 | > acl: (2) [firstarg] [secondarg] | |
104 | > acl: (1) [arg with spaces] [] | |
723c72e6 JH |
105 | > acl: |
106 | > acl: | |
bef3ea7f JH |
107 | > acl: (0) [] [] |
108 | > acl: (1) [person@dom.ain] [] | |
109 | > Failed: error from acl "a_defer" | |
110 | > acl: (2) [new arg1] [top_arg_1] | |
525239c1 | 111 | > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] [] |
723c72e6 | 112 | > |
54c5ebb1 PH |
113 | > addrss: local-part@dom.ain |
114 | > addrss: local-part@dom.ain | |
115 | > domain: dom.ain | |
116 | > domain: dom.ain | |
29f89cad PH |
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 | > | |
54c5ebb1 PH |
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") | |
af561417 | 136 | > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3") |
54c5ebb1 PH |
137 | > eval: 1 |
138 | > eval: -5 | |
af561417 | 139 | > eval: 1 |
54c5ebb1 PH |
140 | > eval: 40962 |
141 | > eval: 63 | |
af561417 | 142 | > Failed: error in expression evaluation: expecting operator (after processing "0") |
54c5ebb1 PH |
143 | > eval10: 77 |
144 | > eval10: 8 | |
af561417 PH |
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 | > | |
54c5ebb1 PH |
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 | > The base62 operator is actually a base36 operator in the Darwin and Cygwin | |
172 | > environments. Write cunning tests that produce the same output in both cases, | |
173 | > while doing a reasonable check. | |
174 | > | |
175 | > base62: OK | |
176 | > base62d: OK | |
177 | > base62d: OK | |
178 | > Failed: argument for base62 operator is "12345x", which is not a decimal number | |
179 | > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number | |
180 | > | |
181 | > hmac: dd97e3ba5d1a61b5006108f8c8252953 | |
182 | > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064 | |
183 | > md5: 77add1d5f41223d5582fca736a5cb335 | |
184 | > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709 | |
185 | > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D | |
186 | > mask: 192.168.10.192/28 | |
187 | > mask: 192.168.10.206/32 | |
188 | > Failed: mask value too big in "192.168.10.206/33" | |
189 | > mask: 0.0.0.0/0 | |
190 | > Failed: missing mask value in "192.168.10.206" | |
191 | > Failed: "a.b.c.d" is not an IP address | |
fc4a7f70 JH |
192 | > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001 |
193 | > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001 | |
194 | > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001 | |
195 | > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001 | |
196 | > ipv6norm: ::1 | |
197 | > ipv6norm: 2a00:: | |
198 | > ipv6norm: 2a00::1 | |
199 | > ipv6norm: 2a00:eadf::1:0 | |
200 | > ipv6norm: 2a00:eadf:0:1:: | |
201 | > ipv6norm: 2a00:: | |
202 | > ipv6norm: 2a00:2:3:4:5:6:7:8 | |
54c5ebb1 PH |
203 | > nhash: 19 0/61 |
204 | > lc/uc: the quick BROWN FOX | |
205 | > length: The quick abc | |
206 | > lclpt: local-part | |
207 | > lclpt: local-part | |
208 | > quote: aZ09_.-Q "ab*cd" "abcd\"ef" | |
209 | > quote: "nl(\n)" | |
210 | > quote: "cr(\r)" | |
211 | > quote: "tab( )" | |
212 | > quote: "xff(ÿ)" | |
213 | > quote: Empty>""< | |
214 | > quote_local_part: abcd | |
215 | > quote_local_part: O'Reilly | |
216 | > quote_local_part: "a space" | |
217 | > quote_local_part: ".something" | |
218 | > quote_local_part: "something." | |
219 | > quote_local_part: joe.bloggs | |
220 | > quote_local_part: a!b | |
221 | > quote_local_part: "x@y" | |
222 | > quote_local_part: ab*cd | |
223 | > quote_local_part: "x:y" | |
224 | > quote_local_part: "abcd\"ef" | |
225 | > quote_local_part: "" | |
226 | > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef | |
c10d53a2 | 227 | > hexquote: \x01\x02\x03\x04\x05\x06\x07\x20\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x20\x10\x11\x12\x13\x14\x15\x16\x17\x20\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x20!"#$%&'\x20()*+,-./\x2001234567\x2089:;<=>?\x20@ABCDEFG\x20HIJKLMNO\x20PQRSTUVW\x20XYZ[\]^_\x20`abcdefg\x20hijklmno\x20pqrstuvw\x20xyz{|}~\x7f |
54c5ebb1 PH |
228 | > substr: ba 34 1 |
229 | > substr: barb rhuba | |
230 | > substr: | |
231 | > substr: | |
232 | > str2b64:YWJjZA== | |
233 | > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94 | |
9aa35e9c JH |
234 | > base64: YWJjZA== |
235 | > base64: VGhlIHF1aWNrIGJyb3duIAogZm94 | |
236 | > base64d:abcd | |
237 | > base64d:The quick brown | |
238 | fox | |
54c5ebb1 PH |
239 | > strlen: 0 |
240 | > strlen: 1 | |
241 | > strlen: 8 | |
f90d018c PH |
242 | > time_eval: 10 |
243 | > time_eval: 7200 | |
244 | > time_eval: 86700 | |
245 | > time_eval: 788645 | |
246 | > Failed: string "14" is not an Exim time interval in "time_eval" operator | |
247 | > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator | |
54c5ebb1 PH |
248 | > time_interval: 0s |
249 | > time_interval: 44s | |
250 | > time_interval: 1w4d13h46m39s | |
251 | > Failed: string "-1" is not a positive number in "time_interval" operator | |
252 | > Failed: string "rhubarb" is not a positive number in "time_interval" operator | |
253 | > | |
254 | > # stat is a bit tricky, but some of the fields of the aux-var directory | |
255 | > # should be the same on all systems | |
256 | > | |
257 | > stat: 40755 | |
258 | > stat: drwxr-xr-x | |
259 | > Failed: stat(/a/non/existent/file) failed: No such file or directory | |
260 | > | |
261 | > # "Operators" that have expanded arguments | |
262 | > | |
263 | > hash: jmg monty fbWx | |
264 | > hash: abcX abX aX X | |
265 | > nhash: 19 0/61 | |
266 | > length: The quick abc | |
267 | > substr: ba 34 1 | |
268 | > substr: | |
269 | > | |
270 | > # Error forms | |
271 | > | |
272 | > Failed: missing or misplaced { or } | |
273 | > Failed: "nonnumber" is not a number (in "hash" expansion) | |
274 | > Failed: Too many arguments for "hash" (max is 3) | |
275 | > Failed: "-2" is not a positive number (in "substr" expansion) | |
276 | > | |
277 | > # Skipped operators | |
278 | > | |
279 | > addrss: NO | |
280 | > domain: NO | |
281 | > escape: NO | |
282 | > expand: NO | |
283 | > hash: NO | |
284 | > md5: NO | |
285 | > mask: NO | |
286 | > | |
c9a55f6a JH |
287 | > # Number suffixes in conditions |
288 | > 1k: y | |
289 | > 1K: y | |
290 | > 1M: y | |
291 | > 1G: y | |
292 | > | |
d45b1de8 | 293 | > # Numeric overflow |
aa7c82b2 | 294 | > # >32b should work, >64b not |
d45b1de8 | 295 | > |
725735cd JH |
296 | > 1 > 2047M n |
297 | > 1 > 2048M n | |
298 | > 1 > 4096000000 n | |
299 | > 1 > 4096M n | |
300 | > 1 > 4611686018427387904 n | |
aa7c82b2 | 301 | > Failed: absolute value of integer "46116860184273879040" is too large (overflow) |
d45b1de8 | 302 | > |
54c5ebb1 PH |
303 | > # Conditions |
304 | > | |
305 | > 2=2: y | |
306 | > 2==2: y | |
307 | > 3=2: n | |
308 | > 2==3: n | |
309 | > !2=2: n | |
310 | > !2==2: n | |
311 | > !3=2: y | |
312 | > !2==3: y | |
313 | > 2>3: n | |
314 | > 3>3: n | |
315 | > 4>3: y | |
d45b1de8 | 316 | > 1>-1: y |
54c5ebb1 PH |
317 | > 2>=3: n |
318 | > 3>=3: y | |
319 | > 4>=3: y | |
320 | > 2<3: y | |
321 | > 3<3: n | |
322 | > 4<3: n | |
323 | > 2<=3: y | |
324 | > 3<=3: y | |
325 | > 4<=3: n | |
326 | > 5<=3: n | |
d45b1de8 | 327 | > -3<=1: y |
54c5ebb1 PH |
328 | > |
329 | > 5>3k: n | |
330 | > 5>3m: n | |
d45b1de8 PH |
331 | > Failed: invalid integer "3z " |
332 | > Failed: integer expected but "a" found | |
0de7239e | 333 | > Failed: integer expected but "${substr_2_2:65535}" found |
54c5ebb1 | 334 | > |
5dd1517f PH |
335 | > >0: n |
336 | > =: y | |
337 | > -2<: y | |
338 | > 08>07: y | |
339 | > 011=11: y | |
340 | > | |
54c5ebb1 PH |
341 | > def:y y |
342 | > def:n n | |
343 | > Failed: unknown variable "post" after "def:" | |
344 | > def:h_f n | |
345 | > def:h_f n | |
346 | > Failed: missing or misplaced { or } | |
347 | > | |
348 | > exists: y | |
349 | > exists: n | |
350 | > | |
351 | > eq: y | |
352 | > eq: n | |
353 | > !eq: n | |
354 | > !eq: y | |
355 | > | |
356 | > eqi: y | |
357 | > eqi: y | |
358 | > eqi: n | |
359 | > !eqi: n | |
360 | > !eqi: n | |
361 | > !eqi: y | |
362 | > | |
363 | > lt: y | |
364 | > lti: n | |
365 | > le: y | |
366 | > lei: y | |
367 | > gt: n | |
368 | > gti: n | |
369 | > ge: n | |
370 | > gei: y | |
371 | > | |
372 | > isip: y 1.2.3.4 | |
373 | > isip4: y 1.2.3.4 | |
374 | > isip6: n 1.2.3.4 | |
375 | > isip: n 1:2:3:4 | |
376 | > isip4: n 1:2:3:4 | |
377 | > isip6: n 1:2:3:4 | |
378 | > isip: y ::1 | |
379 | > isip4: n ::1 | |
380 | > isip6: y ::1 | |
381 | > isip: y fe80::a00:20ff:fe86:a061 | |
382 | > isip4: n fe80::a00:20ff:fe86:a061 | |
383 | > isip6: y fe80::a00:20ff:fe86:a061 | |
384 | > isip: n rhubarb | |
385 | > isip4: n rhubarb | |
386 | > isip6: n rhubarb | |
387 | > | |
388 | > match: cdab | |
389 | > match: cdab | |
390 | > match: cdab | |
391 | > Failed: "if" failed and "fail" requested | |
392 | > match: cd[xyz]ab | |
393 | > | |
394 | > match_domain: yes | |
395 | > match_domain: no | |
396 | > match_domain: yes | |
397 | > match_domain: yes | |
398 | > match_domain: no | |
399 | > | |
f78eb7c6 PH |
400 | > >x@zz.aa.bb< [] >x@zz.aa.bb< |
401 | > | |
402 | > >x@xxxabc< [] >x@xxxabc< | |
403 | > | |
54c5ebb1 PH |
404 | > match_address: yes |
405 | > match_address: yes | |
406 | > | |
407 | > match_local_part:yes | |
408 | > match_local_part:yes | |
409 | > | |
410 | > match_ip: 01 true | |
411 | > match_ip: 02 | |
412 | > match_ip: 03 true | |
413 | > match_ip: 04 true | |
414 | > match_ip: 05 | |
415 | > match_ip: 06 | |
416 | > match_ip: 07 true | |
417 | > match_ip: 08 true | |
418 | > match_ip: 09 | |
419 | > match_ip: 10 true | |
420 | > Failed: "somename" is not an IP address | |
421 | > match_ip: 12 true | |
422 | > match_ip: 13 true | |
423 | > match_ip: 14 true | |
6a3bceb1 | 424 | > match_ip: 15 true |
54c5ebb1 PH |
425 | > |
426 | > queue_running: n | |
427 | > first_delivery: n | |
428 | > | |
429 | > queue_running after or: y | |
430 | > first_delivery after or: y | |
431 | > | |
bef3ea7f JH |
432 | > # acl expansion condition |
433 | > acl if: Y:(0) [] [] | |
434 | > acl if: Y:(1) [argY] [] | |
435 | > acl if: N:(2) [argN] [arg2] | |
436 | > Failed: error from acl "a_defer" | |
437 | > | |
54c5ebb1 PH |
438 | > # Default values for both if strings |
439 | > | |
440 | > ${if eq{1}{1}} >true< | |
441 | > ${if eq{1}{2}} >< | |
442 | > | |
443 | > # Lookups: DIR is the testing directory. In this test we can only use the | |
444 | > # lookups that are required in all cases. | |
445 | > | |
446 | > CALLER | |
447 | > | |
448 | > ==X@Y | |
449 | > ==* | |
450 | > ==*@Z | |
451 | > ==* | |
452 | > | |
453 | > data for a.b.c.d | |
454 | > failed x.y.z | |
455 | > data for *.p.q | |
456 | > data for *.p.q | |
457 | > data for *.p.q | |
458 | > Failed: "lookup" failed and "fail" requested | |
459 | > data for * | |
460 | > | |
461 | > q1: "abc" | |
462 | > q2: "xyz": | |
463 | > q3: "pqr" : | |
464 | > q4: "a:b" abc continued data (make sure not key) | |
465 | > q5: "\"quoted\"" | |
466 | > q6: "white space" | |
467 | > q7: "b\\s" | |
468 | > | |
469 | > abc: abc | |
470 | > a.b.c: *.b.c | |
471 | > ab.c: *b.c | |
472 | > xyz: ^X | |
473 | > Xyz: ^X | |
474 | > Zyz: ^Z | |
475 | > a b: "^a +b" | |
476 | > a b: "^a +b" | |
477 | > a:b: lookup succeeded | |
478 | > a.b: ^a\\.+b | |
479 | > a..b: ^a\\.+b | |
480 | > a9b: \N^a\d+b | |
481 | > a99b: \N^a\d+b | |
482 | > | |
483 | > # Should give the same results as above because expansion does nothing | |
484 | > | |
485 | > abc: abc | |
486 | > a.b.c: *.b.c | |
487 | > ab.c: *b.c | |
488 | > xyz: ^X | |
489 | > Xyz: ^X | |
490 | > Zyz: ^Z | |
491 | > a b: "^a +b" | |
492 | > a b: "^a +b" | |
493 | > a:b: lookup succeeded | |
494 | > | |
495 | > # Should fail because of no expansion | |
496 | > | |
497 | > a.b: NO | |
498 | > a..b: NO | |
499 | > a9b: NO | |
500 | > a99b: NO | |
501 | > | |
502 | > # But these should succeed | |
503 | > | |
504 | > a\:b: ^a\\.+b | |
505 | > a\:Xb: ^a\\.+b | |
506 | > | |
366fc9f0 PH |
507 | > # Some tests of case-(in)dependence |
508 | > | |
509 | > MiXeD-CD: Data found for case-dependent MiXeD-CD | |
510 | > MixeD-CD: NOT FOUND | |
511 | > MiXeD-Ncd: Data found for case-independent MiXeD-nCD | |
512 | > MixeD-Ncd: Data found for case-independent MiXeD-nCD | |
513 | > | |
54c5ebb1 PH |
514 | > # IP address (CIDR) lookups |
515 | > | |
516 | > 1.2.3.4: data for 1.2.3.4 | |
517 | > 1.2.3.5: | |
518 | > 1.2.3.5: data for * | |
519 | > abcd::cdab: data for abcd::cdab | |
520 | > 192.168.1.2: data for 192.168.0.0/16 | |
521 | > 192.168.5.6: data for 192.168.0.0/16 | |
522 | > abcd:abcd:: data for abcd:abcd::/32 | |
523 | > abcd:abcd:1:: data for abcd:abcd::/32 | |
524 | > abcd:abcd::3 data for abcd:abcd::/32 | |
525 | > Failed: lookup of "rhubarb" gave DEFER: "rhubarb" is not a valid iplsearch key (an IP address, with optional CIDR mask, is wanted): in a host list, use net-iplsearch as the search type | |
526 | > | |
527 | > | |
528 | > # Nested Lookups - style 1 | |
529 | > | |
530 | > The data for key1->key2 | |
531 | > Failed: "lookup" failed and "fail" requested | |
532 | > | |
533 | > # Nested Lookups - style 2 | |
534 | > | |
535 | > The data for key1->key2 | |
536 | > failed for key4 | |
537 | > | |
538 | > # Other nesting tests | |
539 | > | |
540 | > 1-in-1 | |
541 | > 2-in-2 | |
542 | > both-in-1,both-in-2 | |
543 | > Failed: "lookup" failed and "fail" requested | |
544 | > | |
545 | > # Lookup quotes for standardly expected lookups | |
546 | > | |
547 | > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm | |
548 | > Failed: unknown lookup type "xxx" | |
549 | > | |
550 | > # Extract | |
551 | > | |
552 | > 2 | |
553 | > 2 | |
554 | > 2 | |
555 | > 2 | |
556 | > Empty:<> | |
557 | > Empty:<> | |
558 | > <3> | |
559 | > <3> | |
560 | > Empty:<> | |
561 | > Empty:<> | |
562 | > no Z | |
563 | > no 4 | |
564 | > Failed: "extract" failed and "fail" requested | |
565 | > Failed: "extract" failed and "fail" requested | |
566 | > D | |
567 | > a:b:c:d:e | |
568 | > a | |
569 | > e | |
570 | > a | |
571 | > FAIL | |
572 | > b | |
573 | > | |
574 | > b | |
575 | > three four | |
576 | > Failed: first argument of "extract" must not be empty | |
577 | > Failed: first argument of "extract" must not be empty | |
578 | > b | |
579 | > | |
93cc2d6e JH |
580 | > a:b:c |
581 | > Failed: missing or misplaced { or } inside "map" item | |
582 | > | |
54c5ebb1 PH |
583 | > # Translation |
584 | > | |
585 | > abcdea aaa xyz zbcdez | |
586 | > abcdea a z zbcdez | |
587 | > abcdea a abcdea | |
588 | > abcdea abc z zzzdez | |
589 | > | |
fdab5d49 JJ |
590 | > # Boolean |
591 | > "TrUe" true EXPECT: true | |
592 | > "FALSE" false EXPECT: false | |
593 | > " yes" true EXPECT: true | |
594 | > " no" false EXPECT: false | |
595 | > "yes " true EXPECT: true | |
51c7471d | 596 | > "-1" true EXPECT: true |
fdab5d49 JJ |
597 | > "0" false EXPECT: false |
598 | > "1" true EXPECT: true | |
599 | > " 0 " false EXPECT: false | |
600 | > " 1 " true EXPECT: true | |
601 | > "1111111111111111111" true EXPECT: true | |
602 | > "9" true EXPECT: true | |
603 | > " " false EXPECT: false | |
604 | > Failed: unrecognised boolean value "text" | |
605 | > Failed: unrecognised boolean value "text" | |
51c7471d | 606 | > Failed: unrecognised boolean value "-text" |
fdab5d49 JJ |
607 | > Failed: unrecognised boolean value "text" |
608 | > Failed: unrecognised boolean value "text" | |
609 | > "00" false EXPECT: false | |
a769a501 PP |
610 | > "!true" false EXPECT: false |
611 | > "!false" true EXPECT: true | |
fdab5d49 JJ |
612 | > |
613 | > "TrUe" true EXPECT: true | |
614 | > "FALSE" false EXPECT: false | |
615 | > " yes" true EXPECT: true | |
616 | > " no" false EXPECT: false | |
617 | > "yes " true EXPECT: true | |
618 | > "-1" true EXPECT: true | |
619 | > "0" false EXPECT: false | |
620 | > "1" true EXPECT: true | |
621 | > " 0 " false EXPECT: false | |
622 | > " 1 " true EXPECT: true | |
623 | > "1111111111111111111" true EXPECT: true | |
624 | > "9" true EXPECT: true | |
625 | > " " false EXPECT: false | |
626 | > "text" true EXPECT: true | |
627 | > " text" true EXPECT: true | |
628 | > "text " true EXPECT: true | |
629 | > " text " true EXPECT: true | |
630 | > "00" true EXPECT: true | |
a769a501 PP |
631 | > "!true" false EXPECT: false |
632 | > "!false" true EXPECT: true | |
fdab5d49 | 633 | > |
54c5ebb1 PH |
634 | > # RFC 2047 |
635 | > | |
636 | > abcd abcd | |
637 | > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?= | |
638 | > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?= | |
90a3da69 PP |
639 | > Long: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_?= =?iso-8859-8?Q?it_will_go_over_the_75-char_limit?= |
640 | > Long: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_?= =?iso-8859-8?Q?it_will_go_over_the_75-char_limit_by_a_long_way=3B_in?= =?iso-8859-8?Q?_fact_this_one_will_go_over_the_150_character_limit?= | |
54c5ebb1 | 641 | > |
9c57cbc0 PH |
642 | > # RFC 2047 decode |
643 | > | |
644 | > abcd abcd | |
645 | > <:abcd:> <:abcd:> | |
646 | > <:ab cd:> <:ab cd:> | |
647 | > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit | |
648 | > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit by a long way; in fact this one will go over the 150 character limit | |
54c5ebb1 PH |
649 | > |
650 | > # UTF-8 | |
651 | > | |
652 | > abcd abcd | |
653 | > aÀÿd aÀÿd | |
654 | > toobig a_d | |
655 | > | |
656 | > # Substitution | |
657 | > | |
658 | > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef | |
659 | > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z | |
660 | > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef | |
661 | > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef | |
662 | > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef | |
663 | > ${sg{abbab}{a*}{+}} =++b+b++b+ | |
664 | > | |
665 | > # File insertion | |
666 | > | |
667 | > Failed: missing or misplaced { or } | |
668 | > abcde | |
669 | 12345 | |
670 | ||
671 | xyz | |
672 | ||
673 | > abcde12345xyz | |
674 | > abcde:12345::xyz: | |
675 | > abcde - 12345 - - xyz - | |
676 | > Failed: failed to open /non/exist/file: No such file or directory | |
677 | > non-exist | |
678 | > >abcde!12345!!xyz!< | |
679 | > | |
680 | > # Calling a command | |
681 | > | |
682 | > abcd | |
683 | 1234 | |
684 | ||
685 | > RC=0 | |
686 | > 1 | |
687 | > RC=0 | |
688 | > abcd | |
689 | 1234 | |
690 | ||
691 | > RC=0 | |
692 | > 2 | |
693 | > RC=1 | |
694 | > abcd | |
695 | 1234 | |
696 | ||
697 | > RC=1 | |
698 | > N | |
699 | > RC=127 | |
700 | > >><< | |
701 | > RC=0 | |
702 | > 1!=2 | |
703 | > RC=0 | |
704 | > | |
705 | > # PRVS | |
706 | > | |
85b6260a PH |
707 | > prvs=xxxxxxxxxx=userx@test.ex |
708 | > prvs=xxxxxxxxxx=userx@test.ex | |
709 | > prvs=xxxxxxxxxx=userx@test.ex | |
54c5ebb1 PH |
710 | > |
711 | > # Syntax errors | |
712 | > | |
713 | > Failed: prvs second argument must be a single digit | |
714 | > Failed: prvs second argument must be a single digit | |
715 | > Failed: prvs second argument must be a single digit | |
716 | > | |
717 | > # Correct checks; can't put explicit addresses in the tests, because they | |
718 | > # will change over time. | |
719 | > | |
720 | > userx@test.ex | |
721 | > result=1 | |
722 | > | |
723 | > >1< >userx@test.ex< >1< | |
724 | > result=1 | |
725 | > | |
726 | > userx@test.ex | |
727 | > result=1 | |
728 | > | |
729 | > # Incorrect secret | |
730 | > | |
731 | > userx@test.ex | |
732 | > result= | |
733 | > | |
734 | > 0 | |
735 | > result= | |
736 | > | |
737 | > # Non-prvs address | |
738 | > | |
739 | > >><< | |
740 | > result= | |
741 | > | |
742 | > # Syntax errors | |
743 | > | |
744 | > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference) | |
745 | > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference) | |
746 | > Failed: missing } at end of string | |
747 | > Failed: missing } at end of string | |
748 | > Failed: hmac algorithm "xxx" is not recognised | |
749 | > Failed: each subcondition inside an "and{...}" condition must be in its own {} | |
750 | > Failed: unknown condition "xya" inside "and{...}" condition | |
751 | > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition | |
752 | > Failed: missing } at end of string - could be header name not terminated by colon | |
0d85fa3f PH |
753 | > Failed: missing or misplaced { or } |
754 | > Failed: missing or misplaced { or } - could be header name not terminated by colon | |
54c5ebb1 PH |
755 | > Failed: each subcondition inside an "or{...}" condition must be in its own {} |
756 | > Failed: missing } at end of condition inside "or" group | |
757 | > Failed: unknown condition "yes" inside "or{...}" condition | |
758 | > Failed: non-digit after underscore in "substr_1_" | |
759 | > Failed: non-digit after underscore in "substr__3" | |
760 | > | |
0ce9abe6 PH |
761 | > # Iterations: forany and forall |
762 | > | |
763 | > yes | |
764 | > yes | |
765 | > yes | |
766 | > no | |
767 | > yes | |
768 | > no | |
769 | > no | |
770 | > yes | |
771 | > yes | |
772 | > | |
773 | > Failed: unknown condition "yes" inside "forany" condition | |
774 | > Failed: missing } at end of condition inside "forany" | |
775 | > | |
776 | > yes | |
777 | > no | |
778 | > no | |
779 | > no | |
780 | > | |
781 | > no | |
782 | > yes | |
783 | > yes | |
784 | > yes | |
785 | > | |
786 | > # Expect yes | |
787 | > outer=yes item='' (unset) | |
788 | > | |
789 | > # Expect no | |
790 | > outer=no | |
791 | > | |
792 | > # Error inside nest - check message is helpful | |
793 | > Failed: missing } at end of condition inside "forall" inside "forany" condition | |
794 | > | |
795 | > | |
54c5ebb1 PH |
796 | > # Miscellaneous (for bug fixes, etc) |
797 | > | |
798 | > true | |
799 | > | |
089fc87a JH |
800 | > # Environment access |
801 | > | |
802 | > CALLER | |
803 | > correct | |
804 | > | |
54c5ebb1 PH |
805 | > |
806 | > escape: B7·F2ò | |
807 | > | |
808 | > primary_hostname: myhost.test.ex | |
809 | > match: cdab | |
810 | > Failed: "if" failed and "fail" requested | |
811 | > yes | |
812 | > match_address: no | |
813 | > | |
e1a3f32f | 814 | > -be Sender host name and address etc, all unset |
54c5ebb1 PH |
815 | > -oMa sender_host_address = |
816 | > sender_host_port = 0 | |
817 | > -oMaa sender_host_authenticated = | |
818 | > -oMai authenticated_id = CALLER | |
819 | > -oMas authenticated_sender = CALLER@myhost.test.ex | |
820 | > -oMi interface_address = | |
821 | > interface_port = -1 | |
822 | > -oMr received_protocol = | |
823 | > -oMs sender_host_name = | |
824 | > -oMt sender_ident = CALLER | |
825 | > | |
e1a3f32f | 826 | > -be Sender host name and address etc, all set except host name. |
54c5ebb1 PH |
827 | > -oMa sender_host_address = V4NET.0.0.1 |
828 | > sender_host_port = 1234 | |
829 | > -oMaa sender_host_authenticated = AAA | |
830 | > -oMai authenticated_id = philip | |
831 | > -oMas authenticated_sender = xx@yy.zz | |
832 | > -oMi interface_address = 1.1.1.1 | |
833 | > interface_port = 99 | |
834 | > -oMr received_protocol = special | |
835 | > -oMt sender_ident = me | |
836 | > | |
e1a3f32f | 837 | > -be Sender host name explicitly set |
54c5ebb1 PH |
838 | > -oMa sender_host_address = V4NET.0.0.1 |
839 | > sender_host_port = 1234 | |
840 | > -oMs sender_host_name = my.host.name | |
841 | > | |
e1a3f32f | 842 | > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered) |
54c5ebb1 PH |
843 | > -oMs sender_host_name = |
844 | > host_lookup_failed = 1 | |
845 | > | |
e1a3f32f | 846 | > -be Sender host name and protocol set by Sendmail-compatible option |
54c5ebb1 PH |
847 | > -p received_protocol = special |
848 | > -p sender_host_name = host.name | |
849 | > | |
e1a3f32f | 850 | > -be Sender host name and address etc, all set except host name |
54c5ebb1 PH |
851 | > -oMa sender_host_address = V4NET.0.0.1 |
852 | > sender_host_port = 1234 | |
853 | > -oMaa sender_host_authenticated = AAA | |
854 | > -oMai authenticated_id = philip | |
855 | > -oMas authenticated_sender = xx@yy.zz | |
856 | > -oMi interface_address = 1.1.1.1 | |
857 | > interface_port = 99 | |
858 | > -oMr received_protocol = special | |
859 | > ----> No lookup yet: No | |
860 | > -oMs sender_host_name = ten-1.test.ex | |
861 | > -oMt sender_ident = me | |
862 | > | |
863 | ||
864 | **** SMTP testing session as if from host V4NET.0.0.1 | |
865 | **** but without any ident (RFC 1413) callback. | |
866 | **** This is not for real! | |
867 | ||
868 | 550 Administrative prohibition\r | |
869 | ||
870 | **** SMTP testing session as if from host V4NET.0.0.2 | |
871 | **** but without any ident (RFC 1413) callback. | |
872 | **** This is not for real! | |
873 | ||
874 | 550 Administrative prohibition\r | |
875 | ||
876 | **** SMTP testing session as if from host V4NET.0.0.0 | |
877 | **** but without any ident (RFC 1413) callback. | |
878 | **** This is not for real! | |
879 | ||
880 | 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r | |
881 | 250 OK\r | |
882 | 250 Accepted\r | |
883 | 354 Enter message, ending with "." on a line by itself\r | |
884 | 550 reply_address=<>\r | |
885 | 250 OK\r | |
886 | 250 Accepted\r | |
887 | 354 Enter message, ending with "." on a line by itself\r | |
888 | 550 reply_address=<a@b>\r | |
889 | 250 OK\r | |
890 | 250 Accepted\r | |
891 | 354 Enter message, ending with "." on a line by itself\r | |
892 | 550 reply_address=<c@d>\r | |
893 | 250 OK\r | |
894 | 250 Accepted\r | |
895 | 354 Enter message, ending with "." on a line by itself\r | |
896 | 550 reply_address=<>\r | |
897 | 250 OK\r | |
898 | 250 Accepted\r | |
899 | 354 Enter message, ending with "." on a line by itself\r | |
900 | 550 reply_address=<x@y>\r | |
901 | 221 myhost.test.ex closing connection\r | |
902 | ||
903 | **** SMTP testing session as if from host V4NET.0.0.0 | |
904 | **** but without any ident (RFC 1413) callback. | |
905 | **** This is not for real! | |
906 | ||
907 | 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r | |
908 | 250 OK\r | |
909 | 250 Accepted\r | |
910 | 354 Enter message, ending with "." on a line by itself\r | |
911 | 550 reply_address=<>\r | |
912 | 221 myhost.test.ex closing connection\r | |
913 | ||
914 | **** SMTP testing session as if from host V4NET.0.0.0 | |
915 | **** but without any ident (RFC 1413) callback. | |
916 | **** This is not for real! | |
917 | ||
918 | 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r | |
919 | 250 OK\r | |
920 | 250 Accepted\r | |
921 | 354 Enter message, ending with "." on a line by itself\r | |
922 | 550 reply_address=<>\r | |
923 | 221 myhost.test.ex closing connection\r | |
1688f43b PH |
924 | > match_ip: 15 |
925 | > match_ip: 16 | |
926 | > | |
6754ce8c TL |
927 | > in list |
928 | > in list | |
929 | > |