Commit | Line | Data |
---|---|---|
59371ea7 PH |
1 | # Common string expansions |
2 | # | |
3 | # This is the main string expansion test that tests those expansions that will | |
4 | # be present in the basic Exim binary which we require in order to run these | |
5 | # tests at all. Specialized expansion tests also exist for optional features | |
6 | # in other test scripts. | |
c9a55f6a | 7 | munge dnssec |
59371ea7 PH |
8 | |
9 | exim -be | |
10 | ||
11 | # These expansions can test variables in the configuration, but as there | |
12 | # is no message being processed, there is no message-related data. But | |
13 | # that of course gets tested in plenty of other places. | |
14 | ||
15 | # Some fixed variables | |
16 | ||
17 | exim_path: $exim_path | |
18 | primary_hostname: $primary_hostname | |
19 | primary_hostname: ${primary_hostname} | |
20 | qualify_domain: $qualify_domain | |
21 | bounce_return_size_limit: ${bounce_return_size_limit} | |
22 | spool_directory: $spool_directory | |
23 | unknown: ${unknown} | |
24 | h_subject: $h_subject:(should be empty) | |
25 | h_subject:$h_subject (should be empty) | |
26 | header in curlies: ${header_subject:} (should fail) | |
27 | ||
28 | # \$message_headers should be empty | |
29 | message_headers: >$message_headers< | |
30 | ||
31 | # Continuation | |
32 | x\ | |
33 | y | |
34 | x\ | |
35 | y | |
36 | ||
37 | # Overlong names and overbig numbers | |
38 | ||
39 | +$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
40 | +${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} | |
41 | +$11111111111111111111111111111111111 | |
42 | +${11111111111111111111111111111111111} | |
43 | ||
29f89cad PH |
44 | # List operations |
45 | ||
46 | filter: "${filter{a:b:c}{eq{1}{1}}}" | |
47 | filter: ${filter{a:b:c}{!eq{$item}{b}}} | |
48 | filter: ${filter{<' a'b'c}{!eq{$item}{b}}} | |
49 | filter: ${filter{<' ''a'b' ''c}{!eq{$item}{b}}} | |
50 | filter: "${filter{}{!eq{$item}{b}}}" | |
51 | ||
52 | map: "${map{}{$item}}" | |
53 | map: ${map{a:b:c}{$item}} | |
54 | map: ${map{a:b:c}{:$item:}} | |
55 | map: ${if eq{1}{0}{${map{a:b:c}{:$item:}}}{fail string}} | |
56 | map: ${map{:b:c}{[$item]}} | |
57 | ||
58 | reduce: "${reduce{}{+}{$value$item}}" | |
59 | reduce: ${reduce{a:b:c}{+}{$value$item}} | |
60 | reduce: ${reduce {<, 1,2,3}{0}{${eval:$value+$item}}} | |
61 | reduce: ${reduce {3:0:9:4:6}{0}{${if >{$item}{$value}{$item}{$value}}}} | |
62 | ||
a64a3dfa JH |
63 | listnamed: ${listnamed:dlist} |
64 | listnamed: ${listnamed:+dlist} | |
65 | listnamed: ${listnamed:hlist} | |
66 | listnamed: ${listnamed:elist} | |
67 | listnamed: ${listnamed:flist} | |
68 | listnamed: ${listnamed:nolist} | |
69 | listnamed: ${listnamed_d:dlist} | |
70 | listnamed: ${listnamed_d:hlist} | |
71 | listnamed: ${listnamed_z:dlist} | |
72 | ||
73 | listcount: ${listcount:a:b:c} | |
74 | listcount: ${listcount:} | |
75 | listcount: ${listcount:<;a;b;c} | |
76 | listcount: ${listcount:${listnamed:dlist}} | |
042eb971 | 77 | |
ec95d1a6 PH |
78 | # Tests with iscntrl() and illegal separators |
79 | ||
80 | map: ${map{<\n a\n\nb\nc}{'$item'}} | |
81 | ||
82 | reduce: ${reduce {<n 1\n2\n3}{0}{${eval:$value+$item}}} | |
83 | reduce: ${reduce {<\n 1\n2\n3}{0}{${eval:$value+$item}}} | |
84 | reduce: ${reduce { <\n 1\n 2 \n 3 }{0}{${eval:$value+$item}}} | |
85 | reduce: ${reduce {<\x7f 1\x7f2\177 3}{0}{${eval:$value+$item}}} | |
86 | ||
59371ea7 PH |
87 | # Operators |
88 | ||
723c72e6 JH |
89 | acl: ${acl |
90 | acl: ${acl} | |
bef3ea7f | 91 | acl: ${acl {a_nosuch}} |
723c72e6 JH |
92 | acl: ${acl {a_ret}} |
93 | acl: ${acl {a_ret}{person@dom.ain}} | |
525239c1 JH |
94 | acl: ${acl {a_ret}{firstarg}{secondarg}} |
95 | acl: ${acl {a_ret}{arg with spaces}} | |
723c72e6 JH |
96 | acl: ${acl {a_none}} |
97 | acl: ${acl {a_none}{person@dom.ain}} | |
98 | acl: ${acl {a_deny}} | |
99 | acl: ${acl {a_deny}{person@dom.ain}} | |
bef3ea7f JH |
100 | acl: ${acl {a_defer}} |
101 | acl: ${acl {a_sub}{top_arg_1}{top_arg_2}{top_arg_3}} | |
723c72e6 JH |
102 | acl: ${reduce {1:2:3:4} {} {$value ${acl {a_ret}{$item}}}} |
103 | ||
59371ea7 PH |
104 | addrss: ${address:local-part@dom.ain} |
105 | addrss: ${address:Exim Person <local-part@dom.ain> (that's me)} | |
106 | domain: ${domain:local-part@dom.ain} | |
107 | domain: ${domain:Exim Person <local-part@dom.ain> (that's me)} | |
29f89cad PH |
108 | |
109 | addresses: ${addresses:>' 'abc@xyz, 'pqr@xyz} | |
110 | addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me)} | |
111 | addresses: ${addresses:>+ Exim Person <local-part@dom.ain> (that's me),\ | |
112 | xyz@abc} | |
113 | addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me), \ | |
114 | xyz@abc, nullgroupname:;, group: p@q, r@s; } | |
115 | addresses: ${addresses:local-part@dom.ain <local-part@dom.ain>} | |
116 | ||
59371ea7 PH |
117 |