Make integer values 64bit (bug 1171).
[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.
7
8exim -be
9
10# These expansions can test variables in the configuration, but as there
11# is no message being processed, there is no message-related data. But
12# that of course gets tested in plenty of other places.
13
14# Some fixed variables
15
16exim_path: $exim_path
17primary_hostname: $primary_hostname
18primary_hostname: ${primary_hostname}
19qualify_domain: $qualify_domain
20bounce_return_size_limit: ${bounce_return_size_limit}
21spool_directory: $spool_directory
22unknown: ${unknown}
23h_subject: $h_subject:(should be empty)
24h_subject:$h_subject (should be empty)
25header in curlies: ${header_subject:} (should fail)
26
27# \$message_headers should be empty
28message_headers: >$message_headers<
29
30# Continuation
31x\
32y
33x\
34 y
35
36# Overlong names and overbig numbers
37
38+$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
39+${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
40+$11111111111111111111111111111111111
41+${11111111111111111111111111111111111}
42
29f89cad
PH
43# List operations
44
45filter: "${filter{a:b:c}{eq{1}{1}}}"
46filter: ${filter{a:b:c}{!eq{$item}{b}}}
47filter: ${filter{<' a'b'c}{!eq{$item}{b}}}
48filter: ${filter{<' ''a'b' ''c}{!eq{$item}{b}}}
49filter: "${filter{}{!eq{$item}{b}}}"
50
51map: "${map{}{$item}}"
52map: ${map{a:b:c}{$item}}
53map: ${map{a:b:c}{:$item:}}
54map: ${if eq{1}{0}{${map{a:b:c}{:$item:}}}{fail string}}
55map: ${map{:b:c}{[$item]}}
56
57reduce: "${reduce{}{+}{$value$item}}"
58reduce: ${reduce{a:b:c}{+}{$value$item}}
59reduce: ${reduce {<, 1,2,3}{0}{${eval:$value+$item}}}
60reduce: ${reduce {3:0:9:4:6}{0}{${if >{$item}{$value}{$item}{$value}}}}
61
ec95d1a6
PH
62# Tests with iscntrl() and illegal separators
63
64map: ${map{<\n a\n\nb\nc}{'$item'}}
65
66reduce: ${reduce {<n 1\n2\n3}{0}{${eval:$value+$item}}}
67reduce: ${reduce {<\n 1\n2\n3}{0}{${eval:$value+$item}}}
68reduce: ${reduce { <\n 1\n 2 \n 3 }{0}{${eval:$value+$item}}}
69reduce: ${reduce {<\x7f 1\x7f2\177 3}{0}{${eval:$value+$item}}}
70
59371ea7
PH
71# Operators
72
73addrss: ${address:local-part@dom.ain}
74addrss: ${address:Exim Person <local-part@dom.ain> (that's me)}
75domain: ${domain:local-part@dom.ain}
76domain: ${domain:Exim Person <local-part@dom.ain> (that's me)}
29f89cad
PH
77
78addresses: ${addresses:>' 'abc@xyz, 'pqr@xyz}
79addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me)}
80addresses: ${addresses:>+ Exim Person <local-part@dom.ain> (that's me),\
81 xyz@abc}
82addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me), \
83 xyz@abc, nullgroupname:;, group: p@q, r@s; }
84addresses: ${addresses:local-part@dom.ain <local-part@dom.ain>}
85
59371ea7
PH
86