Make RunTest() handle newlines in a portable way
Rather than just outputting \n for a newline, there
is now a way the caller of RunTest() to implement
newline however they want, for example using \r\n
on Windows and \n Linux.
diff --git a/cmd_line_main.c b/cmd_line_main.c
index f9678cd..22817dd 100644
--- a/cmd_line_main.c
+++ b/cmd_line_main.c
@@ -42,9 +42,12 @@
This is an implementation of OutputStringCB built using stdio. If
you don't have stdio, replaces this is
*/
-static void fputs_wrapper(const char *szString, void *ctx)
+static void fputs_wrapper(const char *szString, void *pOutCtx, int bNewLine)
{
- fputs(szString, (FILE *)ctx);
+ fputs(szString, (FILE *)pOutCtx);
+ if(bNewLine) {
+ fputs("\n", pOutCtx);
+ }
}