summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-08-14 13:09:53 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-08-14 14:10:06 +0100
commit7f83b348ccf4cd815e9758ab9ca1012e66324e9d (patch)
treeed6716fb83dfb0a7d35bcb4b059285dd2143f376 /test
parentcebf4027931177cc70106a84e19705f2085a09f5 (diff)
Fix ${readsocket } eol-replacement. Bug 2630
Diffstat (limited to 'test')
-rw-r--r--test/scripts/0000-Basic/037328
-rw-r--r--test/stdout/037338
2 files changed, 65 insertions, 1 deletions
diff --git a/test/scripts/0000-Basic/0373 b/test/scripts/0000-Basic/0373
index 5d8bbee88..37c98e0ab 100644
--- a/test/scripts/0000-Basic/0373
+++ b/test/scripts/0000-Basic/0373
@@ -60,7 +60,7 @@ quit
#
# Tests of IPv4 sockets
#
-server PORT_S 11
+server PORT_S 17
QUERY-1
>LF>ANSWER-1
>*eof
@@ -89,6 +89,24 @@ QUERY-10
>*eof
>LF>ANSWER-11
>*eof
+QUERY-12
+>>ANSWER-12\x0d\x0aANSWER-12\x0d\x0a
+>*eof
+QUERY-13
+>>ANSWER-13\x0d\x0aANSWER-13\x0d\x0a
+>*eof
+QUERY-14
+>>ANSWER-14\x0d\x0aANSWER-14\x0d\x0a
+>*eof
+QUERY-15
+>>ANSWER-15\x0d\x0aANSWER-15\x0d\x0a
+>*eof
+QUERY-16
+>>ANSWER-16\x0d\x0aANSWER-16\x0d\x0a
+>*eof
+QUERY-17
+>>ANSWER-17\x0d\x0aANSWER-17\x0d\x0a
+>*eof
****
millisleep 500
exim -be
@@ -104,6 +122,14 @@ ipv4 cases
9 sock error >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-9\n}{1s}{}{sock error}}<<
10 ANSWER-10\\n >>${readsocket{inet:badloop:PORT_S}{QUERY-10\n}}<<
11 ANSWER-11 >>${readsocket{inet:thisloop:PORT_S}{QUERY-11\n}{2s:shutdown=no}}<<
+
+eol-replacement arg
+12 ANSWER-12x2 (no arg) >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-12\n}{2s}}}<<
+13 ANSWER-13x2 (empty arg) >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-13\n}{2s}{}}}<<
+14 ANSWER-14x2 X >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-14\n}{2s}{X}}}<<
+15 ANSWER-15x2 XYZZY >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-15\n}{2s}{XYZZY}}}<<
+16 ANSWER-16x2 (space) >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-16\n}{2s}{ }}}<<
+17 ANSWER-17x2 (newline) >>${escape:${readsocket{inet:127.0.0.1:PORT_S}{QUERY-17\n}{2s}{\n}}}<<
****
#
exim -be
diff --git a/test/stdout/0373 b/test/stdout/0373
index 513f36468..1e97d0dec 100644
--- a/test/stdout/0373
+++ b/test/stdout/0373
@@ -30,6 +30,14 @@
<<
> 11 ANSWER-11 >><<
>
+> eol-replacement arg
+> 12 ANSWER-12x2 (no arg) >>ANSWER-12\r\nANSWER-12\r\n<<
+> 13 ANSWER-13x2 (empty arg) >>ANSWER-13\r\nANSWER-13\r\n<<
+> 14 ANSWER-14x2 X >>ANSWER-14\rXANSWER-14\rX<<
+> 15 ANSWER-15x2 XYZZY >>ANSWER-15\rXYZZYANSWER-15\rXYZZY<<
+> 16 ANSWER-16x2 (space) >>ANSWER-16\r ANSWER-16\r <<
+> 17 ANSWER-17x2 (newline) >>ANSWER-17\r\nANSWER-17\r\n<<
+>
> Failed: failed to connect to any address for 127.0.0.1: Connection refused
>
> caching of response value
@@ -144,6 +152,36 @@ Listening on port 1224 ...
Connection request from [ip4.ip4.ip4.ip4]
>LF>ANSWER-11
>*eof
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+QUERY-12
+>>ANSWER-12\x0d\x0aANSWER-12\x0d\x0a
+>*eof
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+QUERY-13
+>>ANSWER-13\x0d\x0aANSWER-13\x0d\x0a
+>*eof
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+QUERY-14
+>>ANSWER-14\x0d\x0aANSWER-14\x0d\x0a
+>*eof
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+QUERY-15
+>>ANSWER-15\x0d\x0aANSWER-15\x0d\x0a
+>*eof
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+QUERY-16
+>>ANSWER-16\x0d\x0aANSWER-16\x0d\x0a
+>*eof
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+QUERY-17
+>>ANSWER-17\x0d\x0aANSWER-17\x0d\x0a
+>*eof
End of script
Listening on TESTSUITE/test-socket ...
Connection request