From: Heiko Schlittermann (HS12-RIPE) Date: Sat, 3 Oct 2020 17:43:48 +0000 (+0200) Subject: Testsuite: Provide '>>> ' for script input to allow binary data X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/f7ec095232186edba2b7137594bfdd7d7b7f9504?hp=f093e580a55ad4d41a3ba70bae265b131b5c3bbb Testsuite: Provide '>>> ' for script input to allow binary data This mimics the '>>> ' prefix for the test client. Any line prefixed with '>>> ' will be processed by Perl's string eval(). As '>>> ' is generic and documented, it replaces the (undocumented) '\NONL\' tag. --- diff --git a/test/README b/test/README index d944b29ac..34f09ff08 100644 --- a/test/README +++ b/test/README @@ -862,6 +862,12 @@ 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. +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 @@ -876,7 +882,6 @@ except that the data it generates is copied to the end of the test-stdout file as well as to the named file. - client [] [] This command runs the auxiliary "client" program that simulates an SMTP client. diff --git a/test/runtest b/test/runtest index 4972aedd8..9621e276e 100755 --- a/test/runtest +++ b/test/runtest @@ -2766,8 +2766,9 @@ else { tests_exit(-1, "Command unrecognized in line $lineno: $_"); } # Run the command, with stdin connected to a pipe, and write the stdin data -# to it, with appropriate substitutions. If a line ends with \NONL\, chop off -# the terminating newline (and the \NONL\). If the command contains +# to it, with appropriate substitutions. If a starts with '>>> ', process it +# via Perl's string eval(). +# 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. @@ -2781,7 +2782,8 @@ while (