Testsuite: permit "client" utility to pass trailing spaces from script input lines
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 28 Nov 2015 23:29:24 +0000 (23:29 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 28 Nov 2015 23:45:18 +0000 (23:45 +0000)
test/src/client.c
test/stdout/0482

index ee00912bc9e2e6ce5d09c044335fbb0da78d4ac0..ac9a965e0d3569660453357b9a46dceede770756 100644 (file)
@@ -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 */
 
index 9ece5a3adef102f3a3a6f61d206d78b63656d5f4..ad7ab62dc691103cf29511c92d1f4aeba4664fc0 100644 (file)
@@ -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