update to pre-4.87 master
[exim.git] / test / stdout / 0002
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: "extract" 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 > 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
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
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
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
228 > substr: ba 34  1
229 > substr: barb rhuba
230 > substr: 
231 > substr: 
232 > str2b64:YWJjZA==
233 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
234 > strlen: 0
235 > strlen: 1
236 > strlen: 8
237 > time_eval:     10
238 > time_eval:     7200
239 > time_eval:     86700
240 > time_eval:     788645
241 > Failed: string "14" is not an Exim time interval in "time_eval" operator
242 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
243 > time_interval: 0s
244 > time_interval: 44s
245 > time_interval: 1w4d13h46m39s
246 > Failed: string "-1" is not a positive number in "time_interval" operator
247 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
248
249 > # stat is a bit tricky, but some of the fields of the aux-var directory
250 > # should be the same on all systems
251
252 > stat:   40755
253 > stat:   drwxr-xr-x
254 > Failed: stat(/a/non/existent/file) failed: No such file or directory
255
256 > # "Operators" that have expanded arguments
257
258 > hash:   jmg monty fbWx
259 > hash:   abcX abX aX X
260 > nhash:  19 0/61
261 > length: The quick  abc
262 > substr: ba 34  1
263 > substr: 
264
265 > # Error forms
266
267 > Failed: missing or misplaced { or }
268 > Failed: "nonnumber" is not a number (in "hash" expansion)
269 > Failed: Too many arguments for "hash" (max is 3)
270 > Failed: "-2" is not a positive number (in "substr" expansion)
271
272 > # Skipped operators
273
274 > addrss: NO
275 > domain: NO
276 > escape: NO
277 > expand: NO
278 > hash:   NO
279 > md5:    NO
280 > mask:   NO
281
282 > # Number suffixes in conditions
283 > 1k: y
284 > 1K: y
285 > 1M: y
286 > 1G: y
287
288 > # Numeric overflow
289 > # >32b should work, >64b not
290
291 > 1 > 2047M                n
292 > 1 > 2048M                n
293 > 1 > 4096000000           n
294 > 1 > 4096M                n
295 > 1 > 4611686018427387904  n
296 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
297
298 > # Conditions
299
300 > 2=2:    y
301 > 2==2:   y
302 > 3=2:    n
303 > 2==3:   n
304 > !2=2:   n
305 > !2==2:  n
306 > !3=2:   y
307 > !2==3:  y
308 > 2>3:    n
309 > 3>3:    n
310 > 4>3:    y
311 > 1>-1:   y
312 > 2>=3:   n
313 > 3>=3:   y
314 > 4>=3:   y
315 > 2<3:    y
316 > 3<3:    n
317 > 4<3:    n
318 > 2<=3:   y
319 > 3<=3:   y
320 > 4<=3:   n
321 > 5<=3:   n
322 > -3<=1:  y
323
324 > 5>3k:   n
325 > 5>3m:   n
326 > Failed: invalid integer "3z "
327 > Failed: integer expected but "a" found
328 > Failed: integer expected but "${substr_2_2:65535}" found
329
330 > >0:     n
331 > =:      y
332 > -2<:    y
333 > 08>07:  y
334 > 011=11: y
335
336 > def:y   y
337 > def:n   n
338 > Failed: unknown variable "post" after "def:"
339 > def:h_f n
340 > def:h_f n
341 > Failed: missing or misplaced { or }
342
343 > exists: y
344 > exists: n
345
346 > eq:     y
347 > eq:     n
348 > !eq:    n
349 > !eq:    y
350
351 > eqi:    y
352 > eqi:    y
353 > eqi:    n
354 > !eqi:   n
355 > !eqi:   n
356 > !eqi:   y
357
358 > lt:     y
359 > lti:    n
360 > le:     y
361 > lei:    y
362 > gt:     n
363 > gti:    n
364 > ge:     n
365 > gei:    y
366
367 > isip:   y  1.2.3.4
368 > isip4:  y  1.2.3.4
369 > isip6:  n  1.2.3.4
370 > isip:   n  1:2:3:4
371 > isip4:  n  1:2:3:4
372 > isip6:  n  1:2:3:4
373 > isip:   y      ::1
374 > isip4:  n      ::1
375 > isip6:  y      ::1
376 > isip:   y  fe80::a00:20ff:fe86:a061
377 > isip4:  n  fe80::a00:20ff:fe86:a061
378 > isip6:  y  fe80::a00:20ff:fe86:a061
379 > isip:   n  rhubarb
380 > isip4:  n  rhubarb
381 > isip6:  n  rhubarb
382
383 > match:  cdab
384 > match:  cdab
385 > match:  cdab
386 > Failed: "if" failed and "fail" requested
387 > match:  cd[xyz]ab
388
389 > match_domain:    yes
390 > match_domain:    no
391 > match_domain:    yes
392 > match_domain:    yes
393 > match_domain:    no
394
395 >  >x@zz.aa.bb< [] >x@zz.aa.bb< 
396
397 >  >x@xxxabc< [] >x@xxxabc< 
398
399 > match_address:   yes
400 > match_address:   yes
401
402 > match_local_part:yes
403 > match_local_part:yes
404
405 > match_ip:        01 true
406 > match_ip:        02 
407 > match_ip:        03 true
408 > match_ip:        04 true
409 > match_ip:        05 
410 > match_ip:        06 
411 > match_ip:        07 true
412 > match_ip:        08 true
413 > match_ip:        09 
414 > match_ip:        10 true
415 > Failed: "somename" is not an IP address
416 > match_ip:        12 true
417 > match_ip:        13 true
418 > match_ip:        14 true
419 > match_ip:        15 true
420
421 > queue_running:  n
422 > first_delivery: n
423
424 > queue_running after or: y
425 > first_delivery after or: y
426
427 > # acl expansion condition
428 > acl if: Y:(0) [] []
429 > acl if: Y:(1) [argY] []
430 > acl if: N:(2) [argN] [arg2]
431 > Failed: error from acl "a_defer"
432
433 > # Default values for both if strings
434
435 > ${if eq{1}{1}}  >true<
436 > ${if eq{1}{2}}  ><
437
438 > # Lookups: DIR is the testing directory. In this test we can only use the
439 > # lookups that are required in all cases.
440
441 > CALLER
442
443 > ==X@Y
444 > ==*
445 > ==*@Z
446 > ==*
447
448 > data for a.b.c.d
449 > failed x.y.z
450 > data for *.p.q
451 > data for *.p.q
452 > data for *.p.q
453 > Failed: "lookup" failed and "fail" requested
454 > data for *
455
456 > q1:  "abc"
457 > q2:  "xyz":
458 > q3:  "pqr"  :
459 > q4:  "a:b" abc continued data (make sure not key)
460 > q5:  "\"quoted\""
461 > q6:  "white space"
462 > q7:  "b\\s"
463
464 > abc:   abc
465 > a.b.c: *.b.c
466 > ab.c:  *b.c
467 > xyz:   ^X
468 > Xyz:   ^X
469 > Zyz:   ^Z
470 > a b:   "^a +b"
471 > a  b:  "^a +b"
472 > a:b:   lookup succeeded
473 > a.b:   ^a\\.+b
474 > a..b:  ^a\\.+b
475 > a9b:   \N^a\d+b
476 > a99b:  \N^a\d+b
477
478 > # Should give the same results as above because expansion does nothing
479
480 > abc:   abc
481 > a.b.c: *.b.c
482 > ab.c:  *b.c
483 > xyz:   ^X
484 > Xyz:   ^X
485 > Zyz:   ^Z
486 > a b:   "^a +b"
487 > a  b:  "^a +b"
488 > a:b:   lookup succeeded
489
490 > # Should fail because of no expansion
491
492 > a.b:   NO
493 > a..b:  NO
494 > a9b:   NO
495 > a99b:  NO
496
497 > # But these should succeed
498
499 > a\:b:  ^a\\.+b
500 > a\:Xb: ^a\\.+b
501
502 > # Some tests of case-(in)dependence
503
504 > MiXeD-CD:  Data found for case-dependent MiXeD-CD
505 > MixeD-CD:  NOT FOUND
506 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
507 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
508
509 > # IP address (CIDR) lookups
510
511 > 1.2.3.4:      data for 1.2.3.4
512 > 1.2.3.5:      
513 > 1.2.3.5:      data for *
514 > abcd::cdab:   data for abcd::cdab
515 > 192.168.1.2:  data for 192.168.0.0/16
516 > 192.168.5.6:  data for 192.168.0.0/16
517 > abcd:abcd::   data for abcd:abcd::/32
518 > abcd:abcd:1:: data for abcd:abcd::/32
519 > abcd:abcd::3  data for abcd:abcd::/32
520 > 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
521
522
523 > # Nested Lookups - style 1
524
525 > The data for key1->key2
526 > Failed: "lookup" failed and "fail" requested
527
528 > # Nested Lookups - style 2
529
530 > The data for key1->key2
531 > failed for key4
532
533 > # Other nesting tests
534
535 > 1-in-1
536 > 2-in-2
537 > both-in-1,both-in-2
538 > Failed: "lookup" failed and "fail" requested
539
540 > # Lookup quotes for standardly expected lookups
541
542 > lsearch  !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
543 > Failed: unknown lookup type "xxx"
544
545 > # Extract
546
547 > 2
548 > 2
549 > 2
550 > 2
551 > Empty:<>
552 > Empty:<>
553 > <3>
554 > <3>
555 > Empty:<>
556 > Empty:<>
557 > no Z
558 > no 4
559 > Failed: "extract" failed and "fail" requested
560 > Failed: "extract" failed and "fail" requested
561 > D
562 > a:b:c:d:e
563 > a
564 > e
565 > a
566 > FAIL
567 > b
568
569 > b
570 > three four
571 > Failed: first argument of "extract" must not be empty
572 > Failed: first argument of "extract" must not be empty
573 > b
574
575 > # Translation
576
577 > abcdea aaa xyz zbcdez
578 > abcdea a   z   zbcdez
579 > abcdea a       abcdea
580 > abcdea abc z   zzzdez
581
582 > # Boolean
583 > "TrUe"                true      EXPECT: true
584 > "FALSE"               false     EXPECT: false
585 > " yes"                true      EXPECT: true
586 > " no"                 false     EXPECT: false
587 > "yes "                true      EXPECT: true
588 > "-1"                  true     EXPECT: true
589 > "0"                   false     EXPECT: false
590 > "1"                   true      EXPECT: true
591 > " 0 "                 false     EXPECT: false
592 > " 1 "                 true      EXPECT: true
593 > "1111111111111111111" true      EXPECT: true
594 > "9"                   true      EXPECT: true
595 > " "                   false     EXPECT: false
596 > Failed: unrecognised boolean value "text"
597 > Failed: unrecognised boolean value "text"
598 > Failed: unrecognised boolean value "-text"
599 > Failed: unrecognised boolean value "text"
600 > Failed: unrecognised boolean value "text"
601 > "00"                  false     EXPECT: false
602 > "!true"               false     EXPECT: false
603 > "!false"              true      EXPECT: true
604
605 > "TrUe"                true      EXPECT: true
606 > "FALSE"               false     EXPECT: false
607 > " yes"                true      EXPECT: true
608 > " no"                 false     EXPECT: false
609 > "yes "                true      EXPECT: true
610 > "-1"                  true      EXPECT: true
611 > "0"                   false     EXPECT: false
612 > "1"                   true      EXPECT: true
613 > " 0 "                 false     EXPECT: false
614 > " 1 "                 true      EXPECT: true
615 > "1111111111111111111" true      EXPECT: true
616 > "9"                   true      EXPECT: true
617 > " "                   false     EXPECT: false
618 > "text"                true      EXPECT: true
619 > " text"               true      EXPECT: true
620 > "text "               true      EXPECT: true
621 > " text "              true      EXPECT: true
622 > "00"                  true      EXPECT: true
623 > "!true"               false     EXPECT: false
624 > "!false"              true      EXPECT: true
625
626 > # RFC 2047
627
628 > abcd      abcd
629 > <:abcd:>  =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
630 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
631 > 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?=
632 > 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?=
633
634 > # RFC 2047 decode
635
636 > abcd      abcd
637 > <:abcd:>  <:abcd:>
638 > <:ab cd:> <:ab cd:>
639 > Long:      here we go: a string that is going to be encoded: it will go over the 75-char limit
640 > 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
641
642 > # UTF-8
643
644 > abcd      abcd
645 > aÀÿd      aÀÿd
646 > toobig    a_d
647
648 > # Substitution
649
650 > ${sg{abcdefabcdef}{abc}{xyz}}          =xyzdefxyzdef
651 > ${sg{ab:xy::z}{:}{::}}                 =ab::xy::::z
652 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}}    =a><><><ef
653 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}}   =a>bc<>ef<>bc<ef
654 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
655 > ${sg{abbab}{a*}{+}}                    =++b+b++b+
656
657 > # File insertion
658
659 > Failed: missing or misplaced { or }
660 > abcde
661 12345
662
663 xyz
664
665 > abcde12345xyz
666 > abcde:12345::xyz:
667 > abcde - 12345 -  - xyz - 
668 > Failed: failed to open /non/exist/file: No such file or directory
669 > non-exist
670 > >abcde!12345!!xyz!<
671
672 > # Calling a command
673
674 > abcd
675 1234
676
677 > RC=0
678 > 1
679 > RC=0
680 > abcd
681 1234
682
683 > RC=0
684 > 2
685 > RC=1
686 > abcd
687 1234
688
689 > RC=1
690 > N
691 > RC=127
692 > >><<
693 > RC=0
694 > 1!=2
695 > RC=0
696
697 > # PRVS
698
699 > prvs=xxxxxxxxxx=userx@test.ex
700 > prvs=xxxxxxxxxx=userx@test.ex
701 > prvs=xxxxxxxxxx=userx@test.ex
702
703 > # Syntax errors
704
705 > Failed: prvs second argument must be a single digit
706 > Failed: prvs second argument must be a single digit
707 > Failed: prvs second argument must be a single digit
708
709 > # Correct checks; can't put explicit addresses in the tests, because they
710 > # will change over time.
711
712 > userx@test.ex
713 > result=1
714
715 > >1< >userx@test.ex< >1<
716 > result=1
717
718 > userx@test.ex
719 > result=1
720
721 > # Incorrect secret
722
723 > userx@test.ex
724 > result=
725
726 > 0
727 > result=
728
729 > # Non-prvs address
730
731 > >><<
732 > result=
733
734 > # Syntax errors
735
736 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
737 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
738 > Failed: missing } at end of string
739 > Failed: missing } at end of string
740 > Failed: hmac algorithm "xxx" is not recognised
741 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
742 > Failed: unknown condition "xya" inside "and{...}" condition
743 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
744 > Failed: missing } at end of string - could be header name not terminated by colon
745 > Failed: missing or misplaced { or }
746 > Failed: missing or misplaced { or } - could be header name not terminated by colon
747 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
748 > Failed: missing } at end of condition inside "or" group
749 > Failed: unknown condition "yes" inside "or{...}" condition
750 > Failed: non-digit after underscore in "substr_1_"
751 > Failed: non-digit after underscore in "substr__3"
752
753 > # Iterations: forany and forall
754
755 > yes
756 > yes
757 > yes
758 > no
759 > yes
760 > no
761 > no
762 > yes
763 > yes
764
765 > Failed: unknown condition "yes" inside "forany" condition
766 > Failed: missing } at end of condition inside "forany"
767
768 > yes
769 > no
770 > no
771 > no
772
773 > no
774 > yes
775 > yes
776 > yes
777
778 > # Expect yes
779 > outer=yes item='' (unset)
780
781 > # Expect no
782 > outer=no
783
784 > # Error inside nest - check message is helpful
785 > Failed: missing } at end of condition inside "forall" inside "forany" condition
786
787
788 > # Miscellaneous (for bug fixes, etc)
789
790 > true
791
792 > # Environment access
793
794 > CALLER
795 > correct
796
797
798 > escape: B7·F2ò
799
800 > primary_hostname: myhost.test.ex
801 > match:  cdab
802 > Failed: "if" failed and "fail" requested
803 > yes
804 > match_address:   no
805
806 > -be Sender host name and address etc, all unset
807 > -oMa  sender_host_address = 
808 >       sender_host_port = 0
809 > -oMaa sender_host_authenticated = 
810 > -oMai authenticated_id = CALLER
811 > -oMas authenticated_sender = CALLER@myhost.test.ex
812 > -oMi  interface_address = 
813 >       interface_port = -1
814 > -oMr  received_protocol = 
815 > -oMs  sender_host_name = 
816 > -oMt  sender_ident = CALLER
817
818 > -be Sender host name and address etc, all set except host name.
819 > -oMa  sender_host_address = V4NET.0.0.1
820 >       sender_host_port = 1234
821 > -oMaa sender_host_authenticated = AAA
822 > -oMai authenticated_id = philip
823 > -oMas authenticated_sender = xx@yy.zz
824 > -oMi  interface_address = 1.1.1.1
825 >       interface_port = 99
826 > -oMr  received_protocol = special
827 > -oMt  sender_ident = me
828
829 > -be Sender host name explicitly set
830 > -oMa  sender_host_address = V4NET.0.0.1
831 >       sender_host_port = 1234
832 > -oMs  sender_host_name = my.host.name
833
834 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
835 > -oMs  sender_host_name = 
836 >       host_lookup_failed = 1
837
838 > -be Sender host name and protocol set by Sendmail-compatible option
839 > -p  received_protocol = special
840 > -p  sender_host_name = host.name
841
842 > -be Sender host name and address etc, all set except host name
843 > -oMa  sender_host_address = V4NET.0.0.1
844 >       sender_host_port = 1234
845 > -oMaa sender_host_authenticated = AAA
846 > -oMai authenticated_id = philip
847 > -oMas authenticated_sender = xx@yy.zz
848 > -oMi  interface_address = 1.1.1.1
849 >       interface_port = 99
850 > -oMr  received_protocol = special
851 > ----> No lookup yet: No
852 > -oMs  sender_host_name = ten-1.test.ex
853 > -oMt  sender_ident = me
854
855
856 **** SMTP testing session as if from host V4NET.0.0.1
857 **** but without any ident (RFC 1413) callback.
858 **** This is not for real!
859
860 550 Administrative prohibition\r
861
862 **** SMTP testing session as if from host V4NET.0.0.2
863 **** but without any ident (RFC 1413) callback.
864 **** This is not for real!
865
866 550 Administrative prohibition\r
867
868 **** SMTP testing session as if from host V4NET.0.0.0
869 **** but without any ident (RFC 1413) callback.
870 **** This is not for real!
871
872 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
873 250 OK\r
874 250 Accepted\r
875 354 Enter message, ending with "." on a line by itself\r
876 550 reply_address=<>\r
877 250 OK\r
878 250 Accepted\r
879 354 Enter message, ending with "." on a line by itself\r
880 550 reply_address=<a@b>\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=<c@d>\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=<>\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=<x@y>\r
893 221 myhost.test.ex closing connection\r
894
895 **** SMTP testing session as if from host V4NET.0.0.0
896 **** but without any ident (RFC 1413) callback.
897 **** This is not for real!
898
899 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
900 250 OK\r
901 250 Accepted\r
902 354 Enter message, ending with "." on a line by itself\r
903 550 reply_address=<>\r
904 221 myhost.test.ex closing connection\r
905
906 **** SMTP testing session as if from host V4NET.0.0.0
907 **** but without any ident (RFC 1413) callback.
908 **** This is not for real!
909
910 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
911 250 OK\r
912 250 Accepted\r
913 354 Enter message, ending with "." on a line by itself\r
914 550 reply_address=<>\r
915 221 myhost.test.ex closing connection\r
916 > match_ip:        15 
917 > match_ip:        16 
918
919 > in list
920 > in list
921