26#define expect(expected, got) ok ( expected == got, "Expected %ld, got %ld\n", expected, got)
27#define expect_hr(expected, got) ok ( expected == got, "Expected %08lx, got %08lx\n", expected, got)
37 static const WCHAR openwith[] = {
'O',
'p',
'e',
'n',
'W',
'i',
't',
'h',
'.',
'e',
'x',
'e',0};
42 if (!pAssocQueryStringW)
44 win_skip(
"AssocQueryStringW() is missing\n");
51 ok(
len == 0xdeadbeef,
"got %lu\n",
len);
57 "Unexpected result : %08lx\n",
hr);
58 ok(
len == 0xdeadbeef,
"got %lu\n",
len);
65 "Unexpected result : %08lx\n",
hr);
76 "Unexpected result : %08lx\n",
hr);
77 ok(
len == 0xdeadbeef,
"got %lu\n",
len);
82 "Unexpected result : %08lx\n",
hr);
87 ok(
len == 0xdeadbeef,
"got %lu\n",
len);
93 "Unexpected result : %08lx\n",
hr);
94 ok(
len == 0xdeadbeef,
"got %lu\n",
len);
102 "Unexpected result : %08lx\n",
hr);
104 "got hr=%08lx and len=%lu\n",
hr,
len);
111 "Unexpected result : %08lx\n",
hr);
112 ok(
len == 0xdeadbeef,
"got %lu\n",
len);
117 "Unexpected result : %08lx\n",
hr);
123 WCHAR * friendlyName;
124 WCHAR * executableName;
127 if (!pAssocQueryStringW)
129 win_skip(
"AssocQueryStringW() is missing\n");
137 skip(
"failed to get initial len\n");
145 skip(
"failed to allocate memory\n");
151 executableName, &len2);
153 slen =
lstrlenW(executableName) + 1;
162 "Unexpected result : %08lx\n",
hr);
166 skip(
"failed to get initial len\n");
175 skip(
"failed to allocate memory\n");
181 friendlyName, &len2);
196 static const CHAR dotWinetest[] = {
197 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0
199 static const CHAR winetestfile[] = {
200 'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'f',
'i',
'l',
'e',0
202 static const CHAR winetestfileAction[] = {
203 'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'f',
'i',
'l',
'e',
204 '\\',
's',
'h',
'e',
'l',
'l',
206 '\\',
'c',
'o',
'm',
'm',
'a',
'n',
'd',0
209 'n',
'o',
't',
'e',
'p',
'a',
'd',
'.',
'e',
'x',
'e',0
214 if (!pAssocQueryStringA)
216 win_skip(
"AssocQueryStringA() is missing\n");
223 skip(
"failed to create dotWinetest key\n");
231 skip(
"failed to set dotWinetest key\n");
238 skip(
"failed to create winetestfileAction key\n");
246 skip(
"failed to set winetestfileAction key\n");
253 "Unexpected result : %08lx\n",
hr);
257 "got '%s' (Expected result to include 'notepad.exe')\n",
buf);
268 IQueryAssociations *pqa;
272 win_skip(
"AssocCreate() is missing\n");
281 ,
"Unexpected result : %08lx\n",
hr);
285 ,
"Unexpected result : %08lx\n",
hr);
287 hr = pAssocCreate(CLSID_QueryAssociations, &IID_IQueryAssociations, (
LPVOID*)&pqa);
289 ,
"Unexpected result : %08lx\n",
hr);
297 ,
"Unexpected result : %08lx\n",
hr);
char * strstr(char *String1, char *String2)
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
static void cleanup(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
DWORD WINAPI SHDeleteKeyA(HKEY hKey, LPCSTR lpszSubKey)
GLenum GLuint GLenum GLsizei const GLchar * buf
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_FILE_NOT_FOUND
#define expect_hr(expected, got)
static void **static void test_getstring_bad(void)
static void test_getstring_basic(void)
static void test_assoc_create(void)
static void test_getstring_no_extra(void)
#define expect(expected, got)
#define IQueryAssociations_Release(p)
@ ASSOCSTR_FRIENDLYAPPNAME
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define ERROR_NO_ASSOCIATION
#define CLASS_E_CLASSNOTAVAILABLE
#define HKEY_CLASSES_ROOT