cmd: use DOS newlines, not UNIX
Austin English
austinenglish at gmail.com
Tue Dec 22 21:04:20 CST 2009
I wrote some cmd tests for appinstall. Testing them on wine, nearly
all failed, because Windows gives a DOS newline (\r\n), whereas we
were giving a UNIX newline (\n). When AutoHotKey/Appinstall tried to
compare the output, it wouldn't match, e.g.,:
cmd /c echo foo
gives (on windows)
foo(space)\r\n
and on wine:
foo(space)\n
Of 28 tests, 27 were failing. Now 'only' 15 fail.
--
-Austin
-------------- next part --------------
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 9f5b6df..34d1ce9 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -83,7 +83,7 @@ HINSTANCE hinst;
DWORD errorlevel;
int echo_mode = 1, verify_mode = 0, defaultColor = 7;
static int opt_c, opt_k, opt_s;
-const WCHAR newline[] = {'\n','\0'};
+const WCHAR newline[] = {'\r','\n','\0'};
static const WCHAR equalsW[] = {'=','\0'};
static const WCHAR closeBW[] = {')','\0'};
WCHAR anykey[100];
More information about the wine-patches
mailing list