1 # ${readsocket (Unix domain and IPv4)
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}}<<}\
12 # Note the difference between:
13 # >*eof => close the connection
14 # *eof => expect to read EOF from client
16 server DIR/test-socket 9
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}}<<
53 server DIR/test-socket
57 exim -odq -bs -oMa V4NET.0.0.0
61 # Tests of IPv4 sockets
93 >>ANSWER-12\x0d\x0aANSWER-12\x0d\x0a
96 >>ANSWER-13\x0d\x0aANSWER-13\x0d\x0a
99 >>ANSWER-14\x0d\x0aANSWER-14\x0d\x0a
102 >>ANSWER-15\x0d\x0aANSWER-15\x0d\x0a
105 >>ANSWER-16\x0d\x0aANSWER-16\x0d\x0a
108 >>ANSWER-17\x0d\x0aANSWER-17\x0d\x0a
114 1 ANSWER-1 >>${readsocket{inet:thisloop:PORT_S}{QUERY-1\n}}<<
115 2 ANSWER-2 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-2\n}}<<
116 3 ANSWER-3*EOL* >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-3\n}{2s}{*EOL*}}<<
117 4 ANSWER-4*EOL* >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-4\n}{2s}{*EOL*}{sock error}}<<
118 5 ANSWER-5 >>${readsocket{inet:127.0.0.1:PORT_S}{}}<<
119 6 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-6\n}}<<
120 7 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-7\n}{1s}{}{sock error}}<<
121 8 read timed out >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-8\n}{1s}}<<
122 9 sock error >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-9\n}{1s}{}{sock error}}<<
123 10 ANSWER-10\\n >>${readsocket{inet:badloop:PORT_S}{QUERY-10\n}}<<
124 11 ANSWER-11 >>${readsocket{inet:thisloop:PORT_S}{QUERY-11\n}{2s:shutdown=no}}<<
127 12 ANSWER-12x2 (no arg) >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-12\n}{2s}}}<<
128 13 ANSWER-13x2 (empty arg) >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-13\n}{2s}{}}}<<
129 14 ANSWER-14x2 X >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-14\n}{2s}{X}}}<<
130 15 ANSWER-15x2 XYZZY >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-15\n}{2s}{XYZZY}}}<<
131 16 ANSWER-16x2 (space) >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-16\n}{2s}{ }}}<<
132 17 ANSWER-17x2 (newline) >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-17\n}{2s}{\n}}}<<
136 crash-regression-check >>${readsocket{inet:127.0.0.1:PORT_N}{}{}}<<
139 # Caching of response value
140 server DIR/test-socket 3
153 caching of response value
154 1 >>${readsocket{DIR/test-socket}{QUERY-1\n}{5s:cache=yes}}<<
155 1+ >>${readsocket{DIR/test-socket}{QUERY-1\n}{5s:cache=yes}}<<
156 2 >>${readsocket{DIR/test-socket}{QUERY-2\n}{5s:cache=yes}}<<
157 2- >>${readsocket{DIR/test-socket2}{QUERY-2\n}{5s:cache=yes}{}{expected failure}}<<
158 1- >>${readsocket{DIR/test-socket2}{QUERY-1\n}{5s:cache=yes}{}{expected failure}}<<
159 1+ >>${readsocket{DIR/test-socket}{QUERY-1\n}{5s:cache=yes}}<<
160 1- >>${readsocket{DIR/test-socket}{QUERY-1\n}{5s}}<<