Packagers: Debian
[exim.git] / test / scripts / 0000-Basic / 0002
CommitLineData
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 7munge dnssec
59371ea7
PH
8
9exim -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
17exim_path: $exim_path
18primary_hostname: $primary_hostname
19primary_hostname: ${primary_hostname}
20qualify_domain: $qualify_domain
21bounce_return_size_limit: ${bounce_return_size_limit}
22spool_directory: $spool_directory
23unknown: ${unknown}
24h_subject: $h_subject:(should be empty)
25h_subject:$h_subject (should be empty)
26header in curlies: ${header_subject:} (should fail)
27
28# \$message_headers should be empty
29message_headers: >$message_headers<
30
31# Continuation
32x\
33y
34x\
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
46filter: "${filter{a:b:c}{eq{1}{1}}}"
47filter: ${filter{a:b:c}{!eq{$item}{b}}}
48filter: ${filter{<' a'b'c}{!eq{$item}{b}}}
49filter: ${filter{<' ''a'b' ''c}{!eq{$item}{b}}}
50filter: "${filter{}{!eq{$item}{b}}}"
51
52map: "${map{}{$item}}"
53map: ${map{a:b:c}{$item}}
54map: ${map{a:b:c}{:$item:}}
55map: ${if eq{1}{0}{${map{a:b:c}{:$item:}}}{fail string}}
56map: ${map{:b:c}{[$item]}}
57
58reduce: "${reduce{}{+}{$value$item}}"
59reduce: ${reduce{a:b:c}{+}{$value$item}}
60reduce: ${reduce {<, 1,2,3}{0}{${eval:$value+$item}}}
61reduce: ${reduce {3:0:9:4:6}{0}{${if >{$item}{$value}{$item}{$value}}}}
62
ec95d1a6
PH
63# Tests with iscntrl() and illegal separators
64
65map: ${map{<\n a\n\nb\nc}{'$item'}}
66
67reduce: ${reduce {<n 1\n2\n3}{0}{${eval:$value+$item}}}
68reduce: ${reduce {<\n 1\n2\n3}{0}{${eval:$value+$item}}}
69reduce: ${reduce { <\n 1\n 2 \n 3 }{0}{${eval:$value+$item}}}
70reduce: ${reduce {<\x7f 1\x7f2\177 3}{0}{${eval:$value+$item}}}
71
59371ea7
PH
72# Operators
73
74addrss: ${address:local-part@dom.ain}
75addrss: ${address:Exim Person <local-part@dom.ain> (that's me)}
76domain: ${domain:local-part@dom.ain}
77domain: ${domain:Exim Person <local-part@dom.ain> (that's me)}
29f89cad
PH
78
79addresses: ${addresses:>' 'abc@xyz, 'pqr@xyz}
80addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me)}
81addresses: ${addresses:>+ Exim Person <local-part@dom.ain> (that's me),\
82 xyz@abc}
83addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me), \
84 xyz@abc, nullgroupname:;, group: p@q, r@s; }
85addresses: ${addresses:local-part@dom.ain <local-part@dom.ain>}
86
59371ea7
PH
87