From 9dc55ab01de1f337224b8d4235b5a573c88331bf Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Fri, 16 Mar 2007 01:39:11 +0000 Subject: [PATCH] kernel32: Fix several failing GetComputerNameA/W tests on Windows. --- dlls/kernel32/tests/environ.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/environ.c b/dlls/kernel32/tests/environ.c index aa61b8e8873..ec686ab5e89 100644 --- a/dlls/kernel32/tests/environ.c +++ b/dlls/kernel32/tests/environ.c @@ -244,7 +244,9 @@ static void test_GetComputerName(void) size = 0; ret = GetComputerNameA((LPSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameA should have failed with ERROR_MORE_DATA instead of %d\n", error); + todo_wine + ok(!ret && error == ERROR_BUFFER_OVERFLOW, "GetComputerNameA should have failed with ERROR_BUFFER_OVERFLOW instead of %d\n", error); + size++; /* nul terminating character */ name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = GetComputerNameA(name, &size); @@ -264,7 +266,9 @@ static void test_GetComputerName(void) size = 0; ret = GetComputerNameW((LPWSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameW should have failed with ERROR_MORE_DATA instead of %d\n", error); + todo_wine + ok(!ret && error == ERROR_BUFFER_OVERFLOW, "GetComputerNameW should have failed with ERROR_BUFFER_OVERFLOW instead of %d\n", error); + size++; /* nul terminating character */ nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = GetComputerNameW(nameW, &size);