Commit eb57396f authored by Nicolas Le Cam's avatar Nicolas Le Cam Committed by Alexandre Julliard

shell32/tests: Skip interactive part of SetNameOf test on Win2k.

Passing an absolute path to SetNameOf on Win2k display an error message box about invalid characters in filename, forcing interaction during test.
parent 1f52f12f
......@@ -473,7 +473,7 @@ static void test_GetDisplayName(void)
IShellFolder_Release(psfFile);
}
if(!pSHBindToParent)
if (!pSHBindToParent)
{
win_skip("SHBindToParent is missing\n");
DeleteFileA(szTestFile);
......@@ -482,6 +482,8 @@ static void test_GetDisplayName(void)
}
/* Some tests for IShellFolder::SetNameOf */
if (pSHGetFolderPathAndSubDirA)
{
hr = pSHBindToParent(pidlTestFile, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast);
ok(SUCCEEDED(hr), "SHBindToParent failed! hr = %08x\n", hr);
if (SUCCEEDED(hr)) {
......@@ -492,7 +494,7 @@ static void test_GetDisplayName(void)
/* The pidl returned through the last parameter of SetNameOf is a simple one. */
hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlLast, wszDirName, SHGDN_NORMAL, &pidlNew);
ok (SUCCEEDED(hr), "SetNameOf failed! hr = %08x\n", hr);
if(hr == S_OK)
if (hr == S_OK)
{
ok (((LPITEMIDLIST)((LPBYTE)pidlNew+pidlNew->mkid.cb))->mkid.cb == 0,
"pidl returned from SetNameOf should be simple!\n");
......@@ -513,6 +515,9 @@ static void test_GetDisplayName(void)
IShellFolder_Release(psfPersonal);
}
}
else
win_skip("Avoid needs of interaction on Win2k\n");
/* Deleting the file and the directory */
DeleteFileA(szTestFile);
......
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