Module: wine Branch: master Commit: 732a07957df8474c85ec7ed4791fdf1699a9c6b9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=732a07957df8474c85ec7ed479...
Author: Paul Vriens paul.vriens.wine@gmail.com Date: Tue Jun 24 12:08:26 2008 +0200
shell32/tests: Skip some tests if functions are not available.
---
dlls/shell32/tests/shellpath.c | 32 +++++++++++++++++++++----------- 1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index a6bbcae..a1cf2d3 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -478,11 +478,14 @@ static void testShellValues(const struct shellExpectedValues testEntries[], { BYTE type;
- type = testSHGetFolderLocation(optional, testEntries[i].folder); - ok(type == testEntries[i].pidlType || optional, - "%s has type %d (0x%02x), expected %d (0x%02x)\n", - getFolderName(testEntries[i].folder), type, type, - testEntries[i].pidlType, testEntries[i].pidlType); + if (pSHGetFolderLocation) + { + type = testSHGetFolderLocation(optional, testEntries[i].folder); + ok(type == testEntries[i].pidlType || optional, + "%s has type %d (0x%02x), expected %d (0x%02x)\n", + getFolderName(testEntries[i].folder), type, type, + testEntries[i].pidlType, testEntries[i].pidlType); + } type = testSHGetSpecialFolderLocation(optional, testEntries[i].folder); ok(type == testEntries[i].pidlType || optional, "%s has type %d (0x%02x), expected %d (0x%02x)\n", @@ -576,12 +579,15 @@ static void testPersonal(void) /* The pidl may be a real folder, or a virtual directory, or a drive if the * home directory is set to the root directory of a drive. */ - type = testSHGetFolderLocation(FALSE, CSIDL_PERSONAL); - ok(type == PT_FOLDER || type == PT_GUID || type == PT_DRIVE, - "CSIDL_PERSONAL returned invalid type 0x%02x, " - "expected PT_FOLDER or PT_GUID\n", type); - if (type == PT_FOLDER) - testSHGetFolderPath(FALSE, CSIDL_PERSONAL); + if (pSHGetFolderLocation) + { + type = testSHGetFolderLocation(FALSE, CSIDL_PERSONAL); + ok(type == PT_FOLDER || type == PT_GUID || type == PT_DRIVE, + "CSIDL_PERSONAL returned invalid type 0x%02x, " + "expected PT_FOLDER or PT_GUID\n", type); + if (type == PT_FOLDER) + testSHGetFolderPath(FALSE, CSIDL_PERSONAL); + } type = testSHGetSpecialFolderLocation(FALSE, CSIDL_PERSONAL); ok(type == PT_FOLDER || type == PT_GUID || type == PT_DRIVE, "CSIDL_PERSONAL returned invalid type 0x%02x, " @@ -898,6 +904,10 @@ START_TEST(shellpath) doChild(myARGV[2]); else { + /* Report missing functions once */ + if (!pSHGetFolderLocation) + skip("SHGetFolderLocation is not available\n"); + /* first test various combinations of parameters: */ testApiParameters();