Module: wine Branch: master Commit: ec7ebd358d2683baeb7c2bc2b8d51be87964ea18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ec7ebd358d2683baeb7c2bc2b8...
Author: Piotr Caban piotr@codeweavers.com Date: Thu Aug 1 11:46:50 2013 +0200
scrrun: Fix IFileSystem3::GetAbsolutePathName tests failures.
---
dlls/scrrun/tests/filesystem.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c index a3ad79f..e231f9a 100644 --- a/dlls/scrrun/tests/filesystem.c +++ b/dlls/scrrun/tests/filesystem.c @@ -401,7 +401,7 @@ static void test_GetAbsolutePathName(void)
WIN32_FIND_DATAW fdata; HANDLE find; - WCHAR buf[MAX_PATH]; + WCHAR buf[MAX_PATH], buf2[MAX_PATH]; BSTR path, result; HRESULT hr;
@@ -424,22 +424,23 @@ static void test_GetAbsolutePathName(void) path = SysAllocString(dir_match1); hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result); ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr); - GetFullPathNameW(dir_match1, MAX_PATH, buf, NULL); - ok(!lstrcmpW(buf, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf)); + GetFullPathNameW(dir_match1, MAX_PATH, buf2, NULL); + ok(!lstrcmpW(buf2, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf2)); SysFreeString(result);
ok(CreateDirectoryW(dir1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir1)); hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result); ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr); GetFullPathNameW(dir1, MAX_PATH, buf, NULL); - ok(!lstrcmpW(buf, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf)); + ok(!lstrcmpW(buf, result) || broken(!lstrcmpW(buf2, result)), "result = %s, expected %s\n", + wine_dbgstr_w(result), wine_dbgstr_w(buf)); SysFreeString(result);
ok(CreateDirectoryW(dir2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir2)); hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result); ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr); - if(!lstrcmpW(buf, result)) { - ok(!lstrcmpW(buf, result), "result = %s, expected %s\n", + if(!lstrcmpW(buf, result) || !lstrcmpW(buf2, result)) { + ok(!lstrcmpW(buf, result) || broken(!lstrcmpW(buf2, result)), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf)); }else { GetFullPathNameW(dir2, MAX_PATH, buf, NULL);