James Hawkins : kernel32: Trace the modified buffer on error.
Module: wine Branch: master Commit: 39732cf92780e19a2eb599d453c47b980d3428ec URL: http://source.winehq.org/git/wine.git/?a=commit;h=39732cf92780e19a2eb599d453... Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Aug 28 21:14:11 2008 -0500 kernel32: Trace the modified buffer on error. --- dlls/kernel32/tests/environ.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/environ.c b/dlls/kernel32/tests/environ.c index e6dd1fc..ad3734f 100644 --- a/dlls/kernel32/tests/environ.c +++ b/dlls/kernel32/tests/environ.c @@ -24,6 +24,13 @@ #include "windef.h" #include "winbase.h" #include "winerror.h" +#include "winnls.h" + +static CHAR string[MAX_PATH]; +#define ok_w(res, format, szString) \ +\ + WideCharToMultiByte(CP_ACP, 0, szString, -1, string, MAX_PATH, NULL, NULL); \ + ok(res, format, string); static BOOL (WINAPI *pGetComputerNameExA)(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD); static BOOL (WINAPI *pGetComputerNameExW)(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD); @@ -156,7 +163,7 @@ static void test_GetSetEnvironmentVariableW(void) lstrcpyW(buf, fooW); ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value)); - ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n"); + ok_w(lstrcmpW(buf, fooW) == 0, "should not touch the buffer: %s\n", buf); ok(ret_size == lstrlenW(value) + 1, "should return length with terminating 0 ret_size=%d\n", ret_size);
participants (1)
-
Alexandre Julliard