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