Commit c0a86cc1 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

shell32: Fix shelllink test to not crash on NT4.

With much help from Francois.
parent 9ef5a863
......@@ -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)
{
......
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