Testsuite: permit "client" utility to pass trailing spaces from script input lines
[exim.git] / test / src / client.c
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 */