Andrew Nguyen : kernel32/tests: Correctly skip tests when the Unicode directory functions are not available .
Alexandre Julliard
julliard at winehq.org
Mon May 18 08:13:18 CDT 2009
Module: wine
Branch: master
Commit: 4f7f110c5e39a3aeb94a6a75bc6894a5a08b2540
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f7f110c5e39a3aeb94a6a75bc6894a5a08b2540
Author: Andrew Nguyen <arethusa26 at gmail.com>
Date: Mon May 18 04:24:20 2009 -0500
kernel32/tests: Correctly skip tests when the Unicode directory functions are not available.
---
dlls/kernel32/tests/directory.c | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel32/tests/directory.c b/dlls/kernel32/tests/directory.c
index a0ccd9f..8d1c457 100644
--- a/dlls/kernel32/tests/directory.c
+++ b/dlls/kernel32/tests/directory.c
@@ -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");
More information about the wine-cvs
mailing list