Commit ec7ebd35 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

scrrun: Fix IFileSystem3::GetAbsolutePathName tests failures.

parent 12d37412
...@@ -401,7 +401,7 @@ static void test_GetAbsolutePathName(void) ...@@ -401,7 +401,7 @@ static void test_GetAbsolutePathName(void)
WIN32_FIND_DATAW fdata; WIN32_FIND_DATAW fdata;
HANDLE find; HANDLE find;
WCHAR buf[MAX_PATH]; WCHAR buf[MAX_PATH], buf2[MAX_PATH];
BSTR path, result; BSTR path, result;
HRESULT hr; HRESULT hr;
...@@ -424,22 +424,23 @@ static void test_GetAbsolutePathName(void) ...@@ -424,22 +424,23 @@ static void test_GetAbsolutePathName(void)
path = SysAllocString(dir_match1); path = SysAllocString(dir_match1);
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result); hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr); ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
GetFullPathNameW(dir_match1, MAX_PATH, buf, NULL); GetFullPathNameW(dir_match1, MAX_PATH, buf2, NULL);
ok(!lstrcmpW(buf, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf)); ok(!lstrcmpW(buf2, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf2));
SysFreeString(result); SysFreeString(result);
ok(CreateDirectoryW(dir1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir1)); ok(CreateDirectoryW(dir1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir1));
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result); hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr); ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
GetFullPathNameW(dir1, MAX_PATH, buf, NULL); 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); SysFreeString(result);
ok(CreateDirectoryW(dir2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir2)); ok(CreateDirectoryW(dir2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir2));
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result); hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr); ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
if(!lstrcmpW(buf, result)) { if(!lstrcmpW(buf, result) || !lstrcmpW(buf2, result)) {
ok(!lstrcmpW(buf, result), "result = %s, expected %s\n", ok(!lstrcmpW(buf, result) || broken(!lstrcmpW(buf2, result)), "result = %s, expected %s\n",
wine_dbgstr_w(result), wine_dbgstr_w(buf)); wine_dbgstr_w(result), wine_dbgstr_w(buf));
}else { }else {
GetFullPathNameW(dir2, MAX_PATH, buf, NULL); GetFullPathNameW(dir2, MAX_PATH, buf, NULL);
......
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