Module: wine Branch: master Commit: c0a86cc103923595308111f62c94c9c0aa126c9a URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0a86cc103923595308111f62c...
Author: André Hentschel nerv@dawncrow.de Date: Tue Dec 14 14:05:25 2010 +0100
shell32: Fix shelllink test to not crash on NT4.
With much help from Francois.
---
dlls/shell32/tests/shelllink.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 2277e5e..f213221 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -168,15 +168,15 @@ static void test_get_set(void)
CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID*)&slW); - if (!slW) - skip("SetPath with NULL parameter crashes on Win9x\n"); + if (!slW /* Win9x */ || !pGetLongPathNameA /* NT4 */) + skip("SetPath with NULL parameter crashes on Win9x and some NT4\n"); else { IShellLinkW_Release(slW); r = IShellLinkA_SetPath(sl, NULL); ok(r==E_INVALIDARG || broken(r==S_OK), /* Some Win95 and NT4 */ - "SetPath failed (0x%08x)\n", r); + "SetPath returned wrong error (0x%08x)\n", r); }
r = IShellLinkA_SetPath(sl, ""); @@ -808,11 +808,16 @@ static void test_datalink(void) ok( r == E_FAIL, "CopyDataBlock failed\n"); ok( dar == NULL, "should be null\n");
- r = IShellLinkW_SetPath(sl, NULL); - ok(r == E_INVALIDARG, "set path failed\n"); + if (!pGetLongPathNameA /* NT4 */) + skip("SetPath with NULL parameter crashes on NT4\n"); + else + { + r = IShellLinkW_SetPath(sl, NULL); + ok(r == E_INVALIDARG, "SetPath returned wrong error (0x%08x)\n", r); + }
r = IShellLinkW_SetPath(sl, lnk); - ok(r == S_OK, "set path failed\n"); + ok(r == S_OK, "SetPath failed\n");
if (0) {