git://git.exim.org
/
users
/
heiko
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f7ec095
)
Revert "Testsuite: Provide '>>> ' for script input to allow binary data"
author
Heiko Schlittermann (HS12-RIPE)
<hs@schlittermann.de>
Sat, 3 Oct 2020 18:00:21 +0000
(20:00 +0200)
committer
Heiko Schlittermann (HS12-RIPE)
<hs@schlittermann.de>
Sat, 3 Oct 2020 18:00:21 +0000
(20:00 +0200)
This reverts commit
f7ec095232186edba2b7137594bfdd7d7b7f9504
.
test/README
patch
|
blob
|
history
test/runtest
patch
|
blob
|
history
test/scripts/0000-Basic/0100
patch
|
blob
|
history
test/scripts/0000-Basic/0101
patch
|
blob
|
history
test/scripts/0000-Basic/0242
patch
|
blob
|
history
diff --git
a/test/README
b/test/README
index 34f09ff08339b093e9d53a5d8763dc6c97313034..d944b29ac8ec792b96908499f8b84f2275228c66 100644
(file)
--- a/
test/README
+++ b/
test/README
@@
-862,12
+862,6
@@
The remaining commands are followed by data lines for their standard input,
terminated by four asterisks. Even if no data is required for the particular
usage, the asterisks must be given.
terminated by four asterisks. Even if no data is required for the particular
usage, the asterisks must be given.
-If the input line starts with '>>> ', this prefix and any trailing spaces
-(including line feed) are removed. The reminder is processed with Perl's string
-eval() function, effectivly evaluatiing escape sequences like '\x41', '\r', and
-such. If you need a line feed there, you need to encode it according to your
-needs.
-
background
background
@@
-882,6
+876,7
@@
except that the data it generates is copied to the end of the test-stdout file
as well as to the named file.
as well as to the named file.
+
client [<options>] <ip address> <port> [<outgoing interface>]
This command runs the auxiliary "client" program that simulates an SMTP client.
client [<options>] <ip address> <port> [<outgoing interface>]
This command runs the auxiliary "client" program that simulates an SMTP client.
diff --git
a/test/runtest
b/test/runtest
index 9621e276e2046699bfc3dc33328f8e0ef3587c8f..4972aedd81a9732522e5da72b4aeb7345762c647 100755
(executable)
--- a/
test/runtest
+++ b/
test/runtest
@@
-2766,9
+2766,8
@@
else { tests_exit(-1, "Command unrecognized in line $lineno: $_"); }
# Run the command, with stdin connected to a pipe, and write the stdin data
# Run the command, with stdin connected to a pipe, and write the stdin data
-# to it, with appropriate substitutions. If a starts with '>>> ', process it
-# via Perl's string eval().
-# If the command contains
+# to it, with appropriate substitutions. If a line ends with \NONL\, chop off
+# the terminating newline (and the \NONL\). If the command contains
# -DSERVER=server add "-server" to the command, where it will adjoin the name
# for the stderr file. See comment above about the use of -DSERVER.
# -DSERVER=server add "-server" to the command, where it will adjoin the name
# for the stderr file. See comment above about the use of -DSERVER.
@@
-2782,8
+2781,7
@@
while (<SCRIPT>)
$lineno++;
last if /^\*{4}\s*$/;
do_substitute($testno);
$lineno++;
last if /^\*{4}\s*$/;
do_substitute($testno);
- s/^>>>\s(.*)\s*$/$1/ and $_ = eval "\"$1\"";
- print CMD;
+ if (/^(.*)\\NONL\\\s*$/) { print CMD $1; } else { print CMD; }
}
# For timeout tests, wait before closing the pipe; we expect a
}
# For timeout tests, wait before closing the pipe; we expect a
diff --git
a/test/scripts/0000-Basic/0100
b/test/scripts/0000-Basic/0100
index e31e9809d5c43631bbbd20e656d4eaff2bcabb16..a8cf6863d8ee167d35b2df6c0723aa129dd007ed 100644
(file)
--- a/
test/scripts/0000-Basic/0100
+++ b/
test/scripts/0000-Basic/0100
@@
-78,7
+78,7
@@
exim -odi userx@test.ex <test-data
****
exim -odi userx@test.ex
Last line ending without a newline and with a partial match:
****
exim -odi userx@test.ex
Last line ending without a newline and with a partial match:
->>> From
+From\NONL\
****
exim -odi filter-userx@test.ex
Test message
****
exim -odi filter-userx@test.ex
Test message
@@
-91,11
+91,11
@@
From: is how headers start
****
exim -odi filter-userx@test.ex
Last line ending without a newline and with a partial match:
****
exim -odi filter-userx@test.ex
Last line ending without a newline and with a partial match:
->>> From
+From\NONL\
****
exim -odi userx@test.ex
Last line ending without a newline and being a single dot:
****
exim -odi userx@test.ex
Last line ending without a newline and being a single dot:
->>> .
+.\NONL\
****
exim -odi mmdf-userx@test.ex
Line consisting of four ^A characters
****
exim -odi mmdf-userx@test.ex
Line consisting of four ^A characters
diff --git
a/test/scripts/0000-Basic/0101
b/test/scripts/0000-Basic/0101
index 512a60ea8fc2f8e88696c592ec02c900c74970bf..12f73c0b8e5c8e914019e29912205f2d3370ef40 100644
(file)
--- a/
test/scripts/0000-Basic/0101
+++ b/
test/scripts/0000-Basic/0101
@@
-61,7
+61,7
@@
exim -odi userx@test.ex <test-data
****
exim -odi userx@test.ex
Last line ending without a newline and with a partial match:
****
exim -odi userx@test.ex
Last line ending without a newline and with a partial match:
->>> From
+From\NONL\
****
exim -odi filter-userx@test.ex
Test message
****
exim -odi filter-userx@test.ex
Test message
@@
-74,11
+74,11
@@
From: is how headers start
****
exim -odi filter-userx@test.ex
Last line ending without a newline and with a partial match:
****
exim -odi filter-userx@test.ex
Last line ending without a newline and with a partial match:
->>> From
+From\NONL\
****
exim -odi userx@test.ex
Last line ending without a newline and being a single dot:
****
exim -odi userx@test.ex
Last line ending without a newline and being a single dot:
->>> .
+.\NONL\
****
exim -odi mmdf-userx@test.ex
Line consisting of four ^A characters
****
exim -odi mmdf-userx@test.ex
Line consisting of four ^A characters
diff --git
a/test/scripts/0000-Basic/0242
b/test/scripts/0000-Basic/0242
index 995f5cc13df59af2b2de8b94b56d01ba8e865ef1..38e49edae56971b38a664c6dac86dee09fbd2be9 100644
(file)
--- a/
test/scripts/0000-Basic/0242
+++ b/
test/scripts/0000-Basic/0242
@@
-17,7
+17,7
@@
QUIT
250 OK
****
exim -odi abc@x.y.z
250 OK
****
exim -odi abc@x.y.z
->>> Test message
+Test message\NONL\
****
server PORT_S
220 Server ready
****
server PORT_S
220 Server ready
@@
-35,5
+35,5
@@
QUIT
250 OK
****
exim -odi abc@x.y.z
250 OK
****
exim -odi abc@x.y.z
->>> Subject: Test message
+Subject: Test message\NONL\
****
****