Commit 39732cf9 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

kernel32: Trace the modified buffer on error.

parent 9aef134b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment