diff options
-rw-r--r-- | test/src/client.c | 5 | ||||
-rw-r--r-- | test/stdout/0482 | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/test/src/client.c b/test/src/client.c index ee00912bc..ac9a965e0 100644 --- 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 (n > 0 && isspace(outbuffer[n-1])) n--; - outbuffer[n] = 0; + + /* Strip trailing newline */ + if (outbuffer[n-1] == '\n') outbuffer[--n] = 0; /* Expect incoming */ diff --git a/test/stdout/0482 b/test/stdout/0482 index 9ece5a3ad..ad7ab62dc 100644 --- a/test/stdout/0482 +++ b/test/stdout/0482 @@ -14,8 +14,8 @@ Connecting to 127.0.0.1 port 1225 ... connected ??? 3 <<< 354 Enter message, ending with "." on a line by itself >>> From : userx ->>> ->>> This is junk +>>> +>>> This is junk >>> . ??? 5 <<< 550 Administrative prohibition |