Commit 4f7f110c authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

kernel32/tests: Correctly skip tests when the Unicode directory functions are not available.

parent 77fa32a8
......@@ -61,8 +61,11 @@ static void test_GetWindowsDirectoryW(void)
static const WCHAR fooW[] = {'f','o','o',0};
len_with_null = GetWindowsDirectoryW(NULL, 0);
if (len_with_null==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
if (len_with_null == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetWindowsDirectoryW is not implemented\n");
return;
}
ok(len_with_null <= MAX_PATH, "should fit into MAX_PATH\n");
lstrcpyW(buf, fooW);
......@@ -124,8 +127,11 @@ static void test_GetSystemDirectoryW(void)
static const WCHAR fooW[] = {'f','o','o',0};
len_with_null = GetSystemDirectoryW(NULL, 0);
if (len_with_null==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
if (len_with_null == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetSystemDirectoryW is not available\n");
return;
}
ok(len_with_null <= MAX_PATH, "should fit into MAX_PATH\n");
lstrcpyW(buf, fooW);
......@@ -337,8 +343,11 @@ static void test_CreateDirectoryW(void)
static const WCHAR questionW[] = {'?',0};
ret = CreateDirectoryW(NULL, NULL);
if (!ret && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("CreateDirectoryW is not available\n");
return;
}
ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND,
"should not create NULL path ret %u err %u\n", ret, GetLastError());
......@@ -441,8 +450,11 @@ static void test_RemoveDirectoryW(void)
GetTempPathW(MAX_PATH, tmpdir);
lstrcatW(tmpdir, tmp_dir_name);
ret = CreateDirectoryW(tmpdir, NULL);
if (!ret && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
return;
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("CreateDirectoryW is not available\n");
return;
}
ok(ret == TRUE, "CreateDirectoryW should always succeed\n");
......
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