Expansions: better error messages for parse errors, and better debug
[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>
e47376be
JH
98> Failed: Not enough arguments for 'acl' (min is 1)
99> Failed: Not enough arguments for 'acl' (min is 1)
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>
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
fc4a7f70
JH
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
54c5ebb1
PH
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