git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testsuite: permit "client" utility to pass trailing spaces from script input lines
[exim.git]
/
test
/
src
/
client.c
diff --git
a/test/src/client.c
b/test/src/client.c
index ee00912bc9e2e6ce5d09c044335fbb0da78d4ac0..ac9a965e0d3569660453357b9a46dceede770756 100644
(file)
--- a/
test/src/client.c
+++ b/
test/src/client.c
@@
-841,8
+841,9
@@
if (tls_on_connect)
while (fgets(CS outbuffer, sizeof(outbuffer), stdin) != NULL)
{
int n = (int)strlen(CS outbuffer);
while (fgets(CS outbuffer, sizeof(outbuffer), stdin) != NULL)
{
int n = (int)strlen(CS outbuffer);
- while (n > 0 && isspace(outbuffer[n-1])) n--;
- outbuffer[n] = 0;
+
+ /* Strip trailing newline */
+ if (outbuffer[n-1] == '\n') outbuffer[--n] = 0;
/* Expect incoming */
/* Expect incoming */