mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 07:56:59 +00:00
[SHELL32_WINETEST] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
09ad24e1f4
commit
b8dc669cfe
7 changed files with 127 additions and 15 deletions
|
@ -494,7 +494,7 @@ static void check_dropdown_(const char *file, UINT line, IAutoCompleteDropDown *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_aclist_expand(HWND hwnd_edit, void *enumerator)
|
static void test_aclist_expand(HWND hwnd_edit, void *enumerator, IAutoCompleteDropDown *acdropdown)
|
||||||
{
|
{
|
||||||
struct string_enumerator *obj = (struct string_enumerator*)enumerator;
|
struct string_enumerator *obj = (struct string_enumerator*)enumerator;
|
||||||
static WCHAR str1[] = {'t','e','s','t',0};
|
static WCHAR str1[] = {'t','e','s','t',0};
|
||||||
|
@ -502,6 +502,7 @@ static void test_aclist_expand(HWND hwnd_edit, void *enumerator)
|
||||||
static WCHAR str2[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\','b','a',0};
|
static WCHAR str2[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\','b','a',0};
|
||||||
static WCHAR str2a[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\',0};
|
static WCHAR str2a[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\',0};
|
||||||
static WCHAR str2b[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\','b','a','z','_','b','b','q','\\',0};
|
static WCHAR str2b[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\','b','a','z','_','b','b','q','\\',0};
|
||||||
|
HRESULT hr;
|
||||||
obj->num_resets = 0;
|
obj->num_resets = 0;
|
||||||
|
|
||||||
ok(obj->num_expand == 0, "Expected 0 expansions, got %u\n", obj->num_expand);
|
ok(obj->num_expand == 0, "Expected 0 expansions, got %u\n", obj->num_expand);
|
||||||
|
@ -546,6 +547,20 @@ static void test_aclist_expand(HWND hwnd_edit, void *enumerator)
|
||||||
dispatch_messages();
|
dispatch_messages();
|
||||||
ok(obj->num_expand == 4, "Expected 4 expansions, got %u\n", obj->num_expand);
|
ok(obj->num_expand == 4, "Expected 4 expansions, got %u\n", obj->num_expand);
|
||||||
ok(obj->num_resets == 5, "Expected 5 resets, got %u\n", obj->num_resets);
|
ok(obj->num_resets == 5, "Expected 5 resets, got %u\n", obj->num_resets);
|
||||||
|
SendMessageW(hwnd_edit, WM_SETTEXT, 0, (LPARAM)str1a);
|
||||||
|
SendMessageW(hwnd_edit, EM_SETSEL, ARRAY_SIZE(str1a) - 1, ARRAY_SIZE(str1a) - 1);
|
||||||
|
SendMessageW(hwnd_edit, WM_CHAR, 'f', 1);
|
||||||
|
dispatch_messages();
|
||||||
|
ok(obj->num_expand == 5, "Expected 5 expansions, got %u\n", obj->num_expand);
|
||||||
|
ok(lstrcmpW(obj->last_expand, str1a) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str1a), wine_dbgstr_w(obj->last_expand));
|
||||||
|
ok(obj->num_resets == 6, "Expected 6 resets, got %u\n", obj->num_resets);
|
||||||
|
hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown);
|
||||||
|
ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %x\n", hr);
|
||||||
|
SendMessageW(hwnd_edit, WM_CHAR, 'o', 1);
|
||||||
|
dispatch_messages();
|
||||||
|
ok(obj->num_expand == 6, "Expected 6 expansions, got %u\n", obj->num_expand);
|
||||||
|
ok(lstrcmpW(obj->last_expand, str1a) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str1a), wine_dbgstr_w(obj->last_expand));
|
||||||
|
ok(obj->num_resets == 7, "Expected 7 resets, got %u\n", obj->num_resets);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_prefix_filtering(HWND hwnd_edit)
|
static void test_prefix_filtering(HWND hwnd_edit)
|
||||||
|
@ -775,7 +790,7 @@ static void test_custom_source(void)
|
||||||
SendMessageW(hwnd_edit, WM_GETTEXT, ARRAY_SIZE(buffer), (LPARAM)buffer);
|
SendMessageW(hwnd_edit, WM_GETTEXT, ARRAY_SIZE(buffer), (LPARAM)buffer);
|
||||||
ok(lstrcmpW(str_aut, buffer) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str_aut), wine_dbgstr_w(buffer));
|
ok(lstrcmpW(str_aut, buffer) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str_aut), wine_dbgstr_w(buffer));
|
||||||
|
|
||||||
test_aclist_expand(hwnd_edit, enumerator);
|
test_aclist_expand(hwnd_edit, enumerator, acdropdown);
|
||||||
obj->num_resets = 0;
|
obj->num_resets = 0;
|
||||||
|
|
||||||
hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown);
|
hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown);
|
||||||
|
|
|
@ -747,6 +747,7 @@ static void test_SHCreateQueryCancelAutoPlayMoniker(void)
|
||||||
IMoniker_Release(mon);
|
IMoniker_Release(mon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define WM_EXPECTED_VALUE WM_APP
|
||||||
#define DROPTEST_FILENAME "c:\\wintest.bin"
|
#define DROPTEST_FILENAME "c:\\wintest.bin"
|
||||||
struct DragParam {
|
struct DragParam {
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
@ -755,11 +756,20 @@ struct DragParam {
|
||||||
|
|
||||||
static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
|
static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
|
||||||
{
|
{
|
||||||
|
static BOOL expected;
|
||||||
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
|
case WM_EXPECTED_VALUE:
|
||||||
|
{
|
||||||
|
expected = lparam;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case WM_DROPFILES:
|
case WM_DROPFILES:
|
||||||
{
|
{
|
||||||
HDROP hDrop = (HDROP)wparam;
|
HDROP hDrop = (HDROP)wparam;
|
||||||
char filename[MAX_PATH] = "dummy";
|
char filename[MAX_PATH] = "dummy";
|
||||||
|
POINT pt;
|
||||||
|
BOOL r;
|
||||||
UINT num;
|
UINT num;
|
||||||
num = DragQueryFileA(hDrop, 0xffffffff, NULL, 0);
|
num = DragQueryFileA(hDrop, 0xffffffff, NULL, 0);
|
||||||
ok(num == 1, "expected 1, got %u\n", num);
|
ok(num == 1, "expected 1, got %u\n", num);
|
||||||
|
@ -768,6 +778,10 @@ static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
|
||||||
num = DragQueryFileA(hDrop, 0, filename, sizeof(filename));
|
num = DragQueryFileA(hDrop, 0, filename, sizeof(filename));
|
||||||
ok(num == strlen(DROPTEST_FILENAME), "got %u\n", num);
|
ok(num == strlen(DROPTEST_FILENAME), "got %u\n", num);
|
||||||
ok(!strcmp(filename, DROPTEST_FILENAME), "got %s\n", filename);
|
ok(!strcmp(filename, DROPTEST_FILENAME), "got %s\n", filename);
|
||||||
|
r = DragQueryPoint(hDrop, &pt);
|
||||||
|
ok(r == expected, "expected %d, got %d\n", expected, r);
|
||||||
|
ok(pt.x == 10, "expected 10, got %d\n", pt.x);
|
||||||
|
ok(pt.y == 20, "expected 20, got %d\n", pt.y);
|
||||||
DragFinish(hDrop);
|
DragFinish(hDrop);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -822,7 +836,7 @@ static DWORD WINAPI drop_window_therad(void *arg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_DragQueryFile(void)
|
static void test_DragQueryFile(BOOL non_client_flag)
|
||||||
{
|
{
|
||||||
struct DragParam param;
|
struct DragParam param;
|
||||||
HANDLE hThread;
|
HANDLE hThread;
|
||||||
|
@ -841,6 +855,9 @@ static void test_DragQueryFile(void)
|
||||||
|
|
||||||
hDrop = GlobalAlloc(GHND, sizeof(DROPFILES) + (strlen(DROPTEST_FILENAME) + 2) * sizeof(WCHAR));
|
hDrop = GlobalAlloc(GHND, sizeof(DROPFILES) + (strlen(DROPTEST_FILENAME) + 2) * sizeof(WCHAR));
|
||||||
pDrop = GlobalLock(hDrop);
|
pDrop = GlobalLock(hDrop);
|
||||||
|
pDrop->pt.x = 10;
|
||||||
|
pDrop->pt.y = 20;
|
||||||
|
pDrop->fNC = non_client_flag;
|
||||||
pDrop->pFiles = sizeof(DROPFILES);
|
pDrop->pFiles = sizeof(DROPFILES);
|
||||||
ret = MultiByteToWideChar(CP_ACP, 0, DROPTEST_FILENAME, -1,
|
ret = MultiByteToWideChar(CP_ACP, 0, DROPTEST_FILENAME, -1,
|
||||||
(LPWSTR)(pDrop + 1), strlen(DROPTEST_FILENAME) + 1);
|
(LPWSTR)(pDrop + 1), strlen(DROPTEST_FILENAME) + 1);
|
||||||
|
@ -848,6 +865,9 @@ static void test_DragQueryFile(void)
|
||||||
pDrop->fWide = TRUE;
|
pDrop->fWide = TRUE;
|
||||||
GlobalUnlock(hDrop);
|
GlobalUnlock(hDrop);
|
||||||
|
|
||||||
|
r = PostMessageA(param.hwnd, WM_EXPECTED_VALUE, 0, !non_client_flag);
|
||||||
|
ok(r, "got %d\n", r);
|
||||||
|
|
||||||
r = PostMessageA(param.hwnd, WM_DROPFILES, (WPARAM)hDrop, 0);
|
r = PostMessageA(param.hwnd, WM_DROPFILES, (WPARAM)hDrop, 0);
|
||||||
ok(r, "got %d\n", r);
|
ok(r, "got %d\n", r);
|
||||||
|
|
||||||
|
@ -860,6 +880,7 @@ static void test_DragQueryFile(void)
|
||||||
CloseHandle(param.ready);
|
CloseHandle(param.ready);
|
||||||
CloseHandle(hThread);
|
CloseHandle(hThread);
|
||||||
}
|
}
|
||||||
|
#undef WM_EXPECTED_VALUE
|
||||||
#undef DROPTEST_FILENAME
|
#undef DROPTEST_FILENAME
|
||||||
|
|
||||||
static void test_SHCreateSessionKey(void)
|
static void test_SHCreateSessionKey(void)
|
||||||
|
@ -938,7 +959,8 @@ START_TEST(shellole)
|
||||||
|
|
||||||
test_SHPropStg_functions();
|
test_SHPropStg_functions();
|
||||||
test_SHCreateQueryCancelAutoPlayMoniker();
|
test_SHCreateQueryCancelAutoPlayMoniker();
|
||||||
test_DragQueryFile();
|
test_DragQueryFile(TRUE);
|
||||||
|
test_DragQueryFile(FALSE);
|
||||||
test_SHCreateSessionKey();
|
test_SHCreateSessionKey();
|
||||||
test_dragdrophelper();
|
test_dragdrophelper();
|
||||||
|
|
||||||
|
|
|
@ -1875,7 +1875,10 @@ if (0) { /* crashes */
|
||||||
path = NULL;
|
path = NULL;
|
||||||
hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_DEFAULT, NULL, &path);
|
hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_DEFAULT, NULL, &path);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
ok(path == NULL, "expected path == NULL\n");
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr);
|
ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr);
|
||||||
ok(path != NULL, "expected path != NULL\n");
|
ok(path != NULL, "expected path != NULL\n");
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "shellapi.h"
|
#include "shellapi.h"
|
||||||
|
#include "shlwapi.h"
|
||||||
#include "shlobj.h"
|
#include "shlobj.h"
|
||||||
|
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
@ -240,10 +241,64 @@ static void test_desktop_folder(void)
|
||||||
IShellFolder_Release(psf);
|
IShellFolder_Release(psf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_desktop_displaynameof(void)
|
||||||
|
{
|
||||||
|
static WCHAR MyComputer[] = { ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}', 0 };
|
||||||
|
static WCHAR MyDocuments[] = { ':',':','{','4','5','0','D','8','F','B','A','-','A','D','2','5','-','1','1','D','0','-','9','8','A','8','-','0','8','0','0','3','6','1','B','1','1','0','3','}', 0 };
|
||||||
|
static WCHAR RecycleBin[] = { ':',':','{','6','4','5','F','F','0','4','0','-','5','0','8','1','-','1','0','1','B','-','9','F','0','8','-','0','0','A','A','0','0','2','F','9','5','4','E','}', 0 };
|
||||||
|
static WCHAR ControlPanel[]= { ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}','\\',
|
||||||
|
':',':','{','2','1','E','C','2','0','2','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','D','-','0','8','0','0','2','B','3','0','3','0','9','D','}', 0 };
|
||||||
|
static WCHAR *folders[] = { MyComputer, MyDocuments, RecycleBin, ControlPanel };
|
||||||
|
IShellFolder *desktop;
|
||||||
|
ITEMIDLIST *pidl;
|
||||||
|
STRRET strret;
|
||||||
|
DWORD eaten;
|
||||||
|
HRESULT hr;
|
||||||
|
UINT i;
|
||||||
|
|
||||||
|
hr = SHGetDesktopFolder(&desktop);
|
||||||
|
ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%08x\n", hr);
|
||||||
|
if (FAILED(hr)) return;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(folders); i++)
|
||||||
|
{
|
||||||
|
WCHAR name1[MAX_PATH], name2[MAX_PATH];
|
||||||
|
|
||||||
|
hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, folders[i], &eaten, &pidl, NULL);
|
||||||
|
ok(hr == S_OK, "IShellFolder::ParseDisplayName failed with error 0x%08x\n", hr);
|
||||||
|
if (FAILED(hr)) continue;
|
||||||
|
|
||||||
|
hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER, &strret);
|
||||||
|
ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr);
|
||||||
|
hr = StrRetToBufW(&strret, pidl, name1, ARRAY_SIZE(name1));
|
||||||
|
ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr);
|
||||||
|
|
||||||
|
hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING | SHGDN_FORADDRESSBAR, &strret);
|
||||||
|
ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr);
|
||||||
|
hr = StrRetToBufW(&strret, pidl, name2, ARRAY_SIZE(name2));
|
||||||
|
ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr);
|
||||||
|
|
||||||
|
ok(!lstrcmpW(name1, name2), "the display names are not equal: %s vs %s\n", wine_dbgstr_w(name1), wine_dbgstr_w(name2));
|
||||||
|
ok(name1[0] != ':' || name1[1] != ':', "display name is a GUID: %s\n", wine_dbgstr_w(name1));
|
||||||
|
|
||||||
|
hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &strret);
|
||||||
|
ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr);
|
||||||
|
hr = StrRetToBufW(&strret, pidl, name1, ARRAY_SIZE(name1));
|
||||||
|
ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr);
|
||||||
|
|
||||||
|
ok(lstrcmpW(name1, name2), "the display names are equal: %s\n", wine_dbgstr_w(name1));
|
||||||
|
ok(name1[0] == ':' && name1[1] == ':', "display name is not a GUID: %s\n", wine_dbgstr_w(name1));
|
||||||
|
|
||||||
|
ILFree(pidl);
|
||||||
|
}
|
||||||
|
IShellFolder_Release(desktop);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(shfldr_special)
|
START_TEST(shfldr_special)
|
||||||
{
|
{
|
||||||
test_parse_for_entire_network();
|
test_parse_for_entire_network();
|
||||||
test_parse_for_control_panel();
|
test_parse_for_control_panel();
|
||||||
test_printers_folder();
|
test_printers_folder();
|
||||||
test_desktop_folder();
|
test_desktop_folder();
|
||||||
|
test_desktop_displaynameof();
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,15 +119,15 @@ static char* decodeA(const char* str)
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WINETEST_PRINTF_ATTR(2,3) childPrintf(HANDLE h, const char* fmt, ...)
|
static void WINAPIV WINETEST_PRINTF_ATTR(2,3) childPrintf(HANDLE h, const char* fmt, ...)
|
||||||
{
|
{
|
||||||
va_list valist;
|
__ms_va_list valist;
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
DWORD w;
|
DWORD w;
|
||||||
|
|
||||||
va_start(valist, fmt);
|
__ms_va_start(valist, fmt);
|
||||||
vsprintf(buffer, fmt, valist);
|
vsprintf(buffer, fmt, valist);
|
||||||
va_end(valist);
|
__ms_va_end(valist);
|
||||||
WriteFile(h, buffer, strlen(buffer), &w, NULL);
|
WriteFile(h, buffer, strlen(buffer), &w, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,16 +353,16 @@ static void dump_child_(const char* file, int line)
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static char shell_call[2048];
|
static char shell_call[2048];
|
||||||
static void WINETEST_PRINTF_ATTR(2,3) _okShell(int condition, const char *msg, ...)
|
static void WINAPIV WINETEST_PRINTF_ATTR(2,3) _okShell(int condition, const char *msg, ...)
|
||||||
{
|
{
|
||||||
va_list valist;
|
__ms_va_list valist;
|
||||||
char buffer[2048];
|
char buffer[2048];
|
||||||
|
|
||||||
strcpy(buffer, shell_call);
|
strcpy(buffer, shell_call);
|
||||||
strcat(buffer, " ");
|
strcat(buffer, " ");
|
||||||
va_start(valist, msg);
|
__ms_va_start(valist, msg);
|
||||||
vsprintf(buffer+strlen(buffer), msg, valist);
|
vsprintf(buffer+strlen(buffer), msg, valist);
|
||||||
va_end(valist);
|
__ms_va_end(valist);
|
||||||
winetest_ok(condition, "%s", buffer);
|
winetest_ok(condition, "%s", buffer);
|
||||||
}
|
}
|
||||||
#define okShell_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : _okShell
|
#define okShell_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : _okShell
|
||||||
|
@ -2831,7 +2831,7 @@ static void test_directory(void)
|
||||||
okShell(rc > 32, "returned %lu\n", rc);
|
okShell(rc > 32, "returned %lu\n", rc);
|
||||||
okChildInt("argcA", 4);
|
okChildInt("argcA", 4);
|
||||||
okChildString("argvA3", "Exec");
|
okChildString("argvA3", "Exec");
|
||||||
todo_wine okChildPath("longPath", path);
|
okChildPath("longPath", path);
|
||||||
SetCurrentDirectoryA(curdir);
|
SetCurrentDirectoryA(curdir);
|
||||||
|
|
||||||
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI,
|
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI,
|
||||||
|
@ -2844,7 +2844,7 @@ static void test_directory(void)
|
||||||
okShell(rc > 32, "returned %lu\n", rc);
|
okShell(rc > 32, "returned %lu\n", rc);
|
||||||
okChildInt("argcA", 4);
|
okChildInt("argcA", 4);
|
||||||
okChildString("argvA3", "Exec");
|
okChildString("argvA3", "Exec");
|
||||||
todo_wine okChildPath("longPath", path);
|
okChildPath("longPath", path);
|
||||||
|
|
||||||
/* Specify it through an environment variable */
|
/* Specify it through an environment variable */
|
||||||
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI,
|
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI,
|
||||||
|
@ -2856,7 +2856,7 @@ static void test_directory(void)
|
||||||
okShell(rc > 32, "returned %lu\n", rc);
|
okShell(rc > 32, "returned %lu\n", rc);
|
||||||
okChildInt("argcA", 4);
|
okChildInt("argcA", 4);
|
||||||
okChildString("argvA3", "Exec");
|
okChildString("argvA3", "Exec");
|
||||||
todo_wine okChildPath("longPath", path);
|
okChildPath("longPath", path);
|
||||||
|
|
||||||
/* Not a colon-separated directory list */
|
/* Not a colon-separated directory list */
|
||||||
sprintf(dirpath, "%s:%s", curdir, tmpdir);
|
sprintf(dirpath, "%s:%s", curdir, tmpdir);
|
||||||
|
|
|
@ -2547,6 +2547,7 @@ static void test_unicode(void)
|
||||||
int ret;
|
int ret;
|
||||||
HANDLE file;
|
HANDLE file;
|
||||||
static const WCHAR UNICODE_PATH_TO[] = {'c',':','\\',0x00ae,0x00ae,'\0'};
|
static const WCHAR UNICODE_PATH_TO[] = {'c',':','\\',0x00ae,0x00ae,'\0'};
|
||||||
|
HWND hwnd;
|
||||||
|
|
||||||
shfoW.hwnd = NULL;
|
shfoW.hwnd = NULL;
|
||||||
shfoW.wFunc = FO_DELETE;
|
shfoW.wFunc = FO_DELETE;
|
||||||
|
@ -2637,6 +2638,20 @@ static void test_unicode(void)
|
||||||
ok(GetLastError() == ERROR_SUCCESS ||
|
ok(GetLastError() == ERROR_SUCCESS ||
|
||||||
broken(GetLastError() == ERROR_INVALID_HANDLE), /* WinXp, win2k3 */
|
broken(GetLastError() == ERROR_INVALID_HANDLE), /* WinXp, win2k3 */
|
||||||
"Expected ERROR_SUCCESS, got %d\n", GetLastError());
|
"Expected ERROR_SUCCESS, got %d\n", GetLastError());
|
||||||
|
|
||||||
|
/* Check SHCreateDirectoryExW with a Hwnd
|
||||||
|
* returns ERROR_ALREADY_EXISTS where a directory already exists */
|
||||||
|
/* Get any window handle */
|
||||||
|
hwnd = FindWindowA(NULL, NULL);
|
||||||
|
ok(hwnd != 0, "FindWindowA failed to produce a hwnd\n");
|
||||||
|
ret = SHCreateDirectoryExW(hwnd, UNICODE_PATH, NULL);
|
||||||
|
ok(!ret, "SHCreateDirectoryExW returned %d\n", ret);
|
||||||
|
/* Create already-existing directory */
|
||||||
|
ok(file_existsW(UNICODE_PATH), "The directory was not created\n");
|
||||||
|
ret = SHCreateDirectoryExW(hwnd, UNICODE_PATH, NULL);
|
||||||
|
ok(ret == ERROR_ALREADY_EXISTS,
|
||||||
|
"Expected ERROR_ALREADY_EXISTS, got %d\n", ret);
|
||||||
|
RemoveDirectoryW(UNICODE_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -3859,6 +3859,8 @@ static void test_ShellItemArrayEnumItems(void)
|
||||||
for(i = 0; i < done; i++)
|
for(i = 0; i < done; i++)
|
||||||
ILFree(apidl[i]);
|
ILFree(apidl[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IShellFolder_Release(psf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue