doc: typo
[exim.git] / test / scripts / 0000-Basic / 0373
1 # ${readsocket (Unix domain and IPv4)
2 need_ipv4
3 #
4 exim -be
5 connfail cases (no server)
6 1 >>${readsocket{DIR/test-socket}{QUERY-1\n}}<<
7 2 ${if exists{DIR/test-socket}\
8   {>>${readsocket{DIR/test-socket}{QUERY-1\n}}<<}\
9   {++ no socket ++}} 
10 ****
11 #
12 # Note the difference between:
13 #   >*eof      => close the connection
14 #   *eof       => expect to read EOF from client
15 #
16 server DIR/test-socket 9
17 QUERY-1
18 >LF>ANSWER-1
19 >*eof
20 QUERY-2
21 >>ANSWER-2
22 >*eof
23 QUERY-3
24 >LF>ANSWER-3
25 >*eof
26 QUERY-4
27 >LF>ANSWER-4
28 >*eof
29 >>ANSWER-5
30 >*eof
31 *sleep 1
32 >*eof
33 >*eof
34 QUERY-8
35 *sleep 2
36 *eof
37 QUERY-9
38 *sleep 2
39 ****
40 millisleep 500
41 exim -be
42 unix-socket cases
43 1 >>${readsocket{DIR/test-socket}{QUERY-1\n}}<<
44 2 >>${readsocket{DIR/test-socket}{QUERY-2\n}}<<
45 3 >>${readsocket{DIR/test-socket}{QUERY-3\n}{2s}{*EOL*}}<<
46 4 >>${readsocket{DIR/test-socket}{QUERY-4\n}{2s}{*EOL*}{sock error}}<<
47 5 >>${readsocket{DIR/test-socket}{}}<<
48 6 >>${readsocket{DIR/test-socket}{QUERY-6\n}}<<
49 7 >>${readsocket{DIR/test-socket}{QUERY-7\n}{1s}{}{sock error}}<<
50 8 >>${readsocket{DIR/test-socket}{QUERY-8\n}{1s}}<<
51 9 >>${readsocket{DIR/test-socket}{QUERY-9\n}{1s}{}{sock error}}<<
52 ****
53 server DIR/test-socket
54 QUERY-ACL
55 *sleep 3
56 ****
57 exim -odq -bs -oMa V4NET.0.0.0
58 quit
59 ****
60 #
61 # Tests of IPv4 sockets
62 #
63 server PORT_S 18
64 QUERY-1
65 >LF>ANSWER-1
66 >*eof
67 QUERY-2
68 >>ANSWER-2
69 >*eof
70 QUERY-3
71 >LF>ANSWER-3
72 >*eof
73 QUERY-4
74 >LF>ANSWER-4
75 >*eof
76 >>ANSWER-5
77 >*eof
78 *sleep 1
79 >*eof
80 >*eof
81 QUERY-8
82 *sleep 2
83 *eof
84 QUERY-9
85 *sleep 2
86 *eof
87 QUERY-10
88 >LF>ANSWER-10
89 >*eof
90 >LF>ANSWER-11a
91 >*eof
92 QUERY-11
93 >LF>ANSWER-11b
94 >*eof
95 QUERY-12
96 >>ANSWER-12\x0d\x0aANSWER-12\x0d\x0a
97 >*eof
98 QUERY-13
99 >>ANSWER-13\x0d\x0aANSWER-13\x0d\x0a
100 >*eof
101 QUERY-14
102 >>ANSWER-14\x0d\x0aANSWER-14\x0d\x0a
103 >*eof
104 QUERY-15
105 >>ANSWER-15\x0d\x0aANSWER-15\x0d\x0a
106 >*eof
107 QUERY-16
108 >>ANSWER-16\x0d\x0aANSWER-16\x0d\x0a
109 >*eof
110 QUERY-17
111 >>ANSWER-17\x0d\x0aANSWER-17\x0d\x0a
112 >*eof
113 ****
114 millisleep 500
115 exim -be
116 ipv4 cases
117 1  ANSWER-1      >>${readsocket{inet:thisloop:PORT_S}{QUERY-1\n}}<<
118 2  ANSWER-2      >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-2\n}}<<
119 3  ANSWER-3*EOL* >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-3\n}{2s}{*EOL*}}<<
120 4  ANSWER-4*EOL* >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-4\n}{2s}{*EOL*}{sock error}}<<
121 5  ANSWER-5      >>${readsocket{inet:127.0.0.1:PORT_S}{}}<<
122 6                >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-6\n}}<<
123 7                >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-7\n}{1s}{}{sock error}}<<
124 8 read timed out >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-8\n}{1s}}<<
125 9  sock error    >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-9\n}{1s}{}{sock error}}<<
126 10 ANSWER-10\\n     >>${readsocket{inet:badloop:PORT_S}{QUERY-10\n}}<<
127 11 ANSWER-11a    >>${readsocket{inet:thisloop:PORT_S}{QUERY-11\n}{2s:shutdown=no}}<<
128 11 ANSWER-11b    >>${readsocket{inet:thisloop:PORT_S}{QUERY-11\n}{2s:shutdown=no}}<<
129
130 eol-replacement arg
131 12 ANSWER-12x2  (no arg)     >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-12\n}{2s}}}<<
132 13 ANSWER-13x2  (empty arg)  >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-13\n}{2s}{}}}<<
133 14 ANSWER-14x2  X            >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-14\n}{2s}{X}}}<<
134 15 ANSWER-15x2  XYZZY        >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-15\n}{2s}{XYZZY}}}<<
135 16 ANSWER-16x2  (space)      >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-16\n}{2s}{ }}}<<
136 17 ANSWER-17x2  (newline)    >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-17\n}{2s}{\n}}}<<
137 ****
138 #
139 exim -be
140 crash-regression-check >>${readsocket{inet:127.0.0.1:PORT_N}{}{}}<<
141 ****
142 #
143 # Caching of response value
144 server DIR/test-socket 3
145 QUERY-1
146 >LF>ANSWER-1
147 >*eof
148 QUERY-2
149 >LF>ANSWER-2
150 >*eof
151 QUERY-1
152 >LF>ANSWER-1
153 >*eof
154 ****
155 millisleep 500
156 exim -be
157 caching of response value
158 1  >>${readsocket{DIR/test-socket}{QUERY-1\n}{5s:cache=yes}}<<
159 1+ >>${readsocket{DIR/test-socket}{QUERY-1\n}{5s:cache=yes}}<<
160 2  >>${readsocket{DIR/test-socket}{QUERY-2\n}{5s:cache=yes}}<<
161 2- >>${readsocket{DIR/test-socket2}{QUERY-2\n}{5s:cache=yes}{}{expected failure}}<<
162 1- >>${readsocket{DIR/test-socket2}{QUERY-1\n}{5s:cache=yes}{}{expected failure}}<<
163 1+ >>${readsocket{DIR/test-socket}{QUERY-1\n}{5s:cache=yes}}<<
164 1- >>${readsocket{DIR/test-socket}{QUERY-1\n}{5s}}<<
165 ****