}
psd = pGetShellSecurityDescriptor(NULL, 2);
- ok(psd==NULL, "GetShellSecurityDescriptor should fail\n");
+ ok(psd==NULL ||
+ broken(psd==INVALID_HANDLE_VALUE), /* IE5 */
+ "GetShellSecurityDescriptor should fail\n");
psd = pGetShellSecurityDescriptor(rgsup, 0);
ok(psd==NULL, "GetShellSecurityDescriptor should fail\n");
win_skip("GetShellSecurityDescriptor is not implemented\n");
return;
}
+ if (psd==INVALID_HANDLE_VALUE)
+ {
+ win_skip("GetShellSecurityDescriptor is broken on IE5\n");
+ return;
+ }
ok(psd!=NULL, "GetShellSecurityDescriptor failed\n");
if (psd!=NULL)
{
HRESULT hres;
if(!pSHPackDispParams)
- skip("SHPackSidpParams not available\n");
+ win_skip("SHPackSidpParams not available\n");
memset(¶ms, 0xc0, sizeof(params));
memset(vars, 0xc0, sizeof(vars));
ok(params.rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", params.rgdispidNamedArgs);
ok(params.rgvarg == vars, "params.rgvarg = %p\n", params.rgvarg);
ok(V_VT(vars) == VT_I4, "V_VT(var) = %d\n", V_VT(vars));
- ok(V_DISPATCH(vars) == (void*)0xdeadbeef, "failed\n");
+ ok(V_I4(vars) == 0xdeadbeef, "failed %x\n", V_I4(vars));
memset(¶ms, 0xc0, sizeof(params));
hres = pSHPackDispParams(¶ms, NULL, 0, 0);
/* Some NULL */
wszString2[0] = 'a';
wszString = pPathCombineW(wszString2, NULL, NULL);
- ok (wszString == NULL, "Expected a NULL return\n");
- ok (wszString2[0] == 0, "Destination string not empty\n");
+ ok (wszString == NULL ||
+ broken(wszString[0] == 'a'), /* Win95 and some W2K */
+ "Expected a NULL return\n");
+ ok (wszString2[0] == 0 ||
+ broken(wszString2[0] == 'a'), /* Win95 and some W2K */
+ "Destination string not empty\n");
HeapFree(GetProcessHeap(), 0, wszString2);
wszString = pPathCombineW(wbuf, wstr1, wstr2);
ok(wszString == NULL, "Expected a NULL return\n");
- ok(wbuf[0] == 0, "Buffer contains data\n");
+ ok(wbuf[0] == 0 ||
+ broken(wbuf[0] == 0xbfbf), /* Win95 and some W2K */
+ "Buffer contains data\n");
/* PathCombineW can be used in place */
wstr1[3] = 0;
lstrcpyA(dest, "control");
str = PathCombineA(dest, "", "");
ok(str == dest, "Expected str == dest, got %p\n", str);
- ok(!lstrcmp(str, "\\"), "Expected \\, got %s\n", str);
+ ok(!lstrcmp(str, "\\") ||
+ broken(!lstrcmp(str, "control")), /* Win95 and some W2K */
+ "Expected \\, got %s\n", str);
ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
/* try NULL directory */
lstrcpyA(dest, "control");
str = PathCombineA(dest, NULL, "");
ok(str == dest, "Expected str == dest, got %p\n", str);
- ok(!lstrcmp(str, "\\"), "Expected \\, got %s\n", str);
- ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
+ ok(!lstrcmp(str, "\\") ||
+ broken(!lstrcmp(str, "one\\two\\three")), /* Win95 and some W2K */
+ "Expected \\, got %s\n", str);
+ ok(GetLastError() == 0xdeadbeef ||
+ broken(GetLastError() == ERROR_INVALID_PARAMETER), /* Win95 */
+ "Expected 0xdeadbeef, got %d\n", GetLastError());
/* try NULL directory and file part */
SetLastError(0xdeadbeef);
lstrcpyA(dest, "control");
str = PathCombineA(dest, NULL, NULL);
- ok(str == NULL, "Expected str == NULL, got %p\n", str);
- ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest));
+ ok(str == NULL ||
+ broken(str != NULL), /* Win95 and some W2K */
+ "Expected str == NULL, got %p\n", str);
+ ok(lstrlenA(dest) == 0 ||
+ broken(!lstrcmp(dest, "control")), /* Win95 and some W2K */
+ "Expected 0 length, got %i\n", lstrlenA(dest));
ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
/* try directory without backslash */
lstrcpyA(dest, "control");
str = PathCombineA(dest, "C:\\", too_long);
ok(str == NULL, "Expected str == NULL, got %p\n", str);
- ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest));
+ ok(lstrlenA(dest) == 0 ||
+ broken(!lstrcmp(dest, "control")), /* Win95 and some W2K */
+ "Expected 0 length, got %i\n", lstrlenA(dest));
todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
/* try a directory longer than MAX_PATH */
lstrcpyA(dest, "control");
str = PathCombineA(dest, too_long, "one\\two\\three");
ok(str == NULL, "Expected str == NULL, got %p\n", str);
- ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest));
+ ok(lstrlenA(dest) == 0 ||
+ broken(!lstrcmp(dest, "control")), /* Win95 and some W2K */
+ "Expected 0 length, got %i\n", lstrlenA(dest));
todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
memset(one, 'b', HALF_LEN);
lstrcpyA(dest, "control");
str = PathCombineA(dest, one, two);
ok(str == NULL, "Expected str == NULL, got %p\n", str);
- ok(lstrlenA(dest) == 0, "Expected 0 length, got %i\n", lstrlenA(dest));
+ ok(lstrlenA(dest) == 0 ||
+ broken(!lstrcmp(dest, "control")), /* Win95 and some W2K */
+ "Expected 0 length, got %i\n", lstrlenA(dest));
ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
}
res = PathAppendA(too_long, "two\\three");
ok(!res, "Expected failure\n");
todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
- ok(lstrlen(too_long) == 0, "Expected length of too_long to be zero, got %i\n", lstrlen(too_long));
+ ok(lstrlen(too_long) == 0 ||
+ broken(lstrlen(too_long) == (LONG_LEN - 1)), /* Win95 and some W2K */
+ "Expected length of too_long to be zero, got %i\n", lstrlen(too_long));
/* pszMore is too long */
lstrcpy(path, "C:\\one");
res = PathAppendA(path, too_long);
ok(!res, "Expected failure\n");
todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
- ok(lstrlen(path) == 0, "Expected length of path to be zero, got %i\n", lstrlen(path));
+ ok(lstrlen(path) == 0 ||
+ broken(!lstrcmp(path, "C:\\one")), /* Win95 and some W2K */
+ "Expected length of path to be zero, got %i\n", lstrlen(path));
/* both params combined are too long */
memset(one, 'a', HALF_LEN);
SetLastError(0xdeadbeef);
res = PathAppendA(one, two);
ok(!res, "Expected failure\n");
- ok(lstrlen(one) == 0, "Expected length of one to be zero, got %i\n", lstrlen(one));
+ ok(lstrlen(one) == 0 ||
+ broken(lstrlen(one) == (HALF_LEN - 1)), /* Win95 and some W2K */
+ "Expected length of one to be zero, got %i\n", lstrlen(one));
ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
}
res = PathCanonicalizeA(dest, "");
ok(res, "Expected success\n");
ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
- ok(!lstrcmp(dest, "\\"), "Expected \\, got %s\n", dest);
+ ok(!lstrcmp(dest, "\\") ||
+ broken(!lstrcmp(dest, "test")), /* Win95 and some W2K */
+ "Expected \\, got %s\n", dest);
/* try a NULL dest */
SetLastError(0xdeadbeef);
lstrcpy(dest, "test");
SetLastError(0xdeadbeef);
res = PathCanonicalizeA(dest, too_long);
- ok(!res, "Expected failure\n");
+ ok(!res ||
+ broken(res), /* Win95, some W2K and XP-SP1 */
+ "Expected failure\n");
todo_wine
{
ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_FILENAME_EXCED_RANGE /* Vista */,
dwType = -1;
dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", &dwType, buf, &dwSize);
ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet);
- ok( 0 == strcmp(sExpTestpath1, buf), "Comparing of (%s) with (%s) failed\n", buf, sExpTestpath1);
- ok( REG_SZ == dwType, "Expected REG_SZ, got (%u)\n", dwType);
+ ok( 0 == strcmp(sExpTestpath1, buf) ||
+ broken(0 == strcmp(sTestpath1, buf)), /* IE4.x */
+ "Comparing of (%s) with (%s) failed\n", buf, sExpTestpath1);
+ ok( REG_SZ == dwType ||
+ broken(REG_EXPAND_SZ == dwType), /* IE4.x */
+ "Expected REG_SZ, got (%u)\n", dwType);
strcpy(buf, sEmptyBuffer);
dwSize = MAX_PATH;
dwSize = 6;
dwRet = SHQueryValueExA( hKey, "Test3", NULL, NULL, NULL, &dwSize);
ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
- ok( dwSize >= nUsedBuffer2, "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
+ ok( dwSize >= nUsedBuffer2 ||
+ broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE4.x */
+ "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
/*
* Case 1 string shrinks during expanding
ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer);
ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1);
- ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
+ ok( REG_SZ == dwType ||
+ broken(REG_EXPAND_SZ == dwType), /* < IE6 */
+ "Expected REG_SZ, got (%u)\n", dwType);
/*
* string grows during expanding
dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer);
- ok( dwSize >= nUsedBuffer2, "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
- ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
+ ok( dwSize >= nUsedBuffer2 ||
+ broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE6 */
+ "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
+ ok( REG_SZ == dwType ||
+ broken(REG_EXPAND_SZ == dwType), /* < IE6 */
+ "Expected REG_SZ, got (%u)\n", dwType);
/*
* string grows during expanding
dwSize = strlen(sEnvvar2) - 2;
dwType = -1;
dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
- ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
+ ok( ERROR_MORE_DATA == dwRet ||
+ broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */
+ broken(ERROR_SUCCESS == dwRet), /* < IE5.5*/
+ "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
todo_wine
{
"Expected empty or unexpanded string (win98), got (%s)\n", buf);
}
- ok( dwSize >= nUsedBuffer2, "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
+ ok( dwSize >= nUsedBuffer2 ||
+ broken(dwSize == (strlen("") + 1)), /* < IE 5.5 */
+ "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
/*
dwSize = nExpLen2 - 4;
dwType = -1;
dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
- ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
+ ok( ERROR_MORE_DATA == dwRet ||
+ broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */
+ broken(ERROR_SUCCESS == dwRet), /* < IE5.5 */
+ "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
todo_wine
{
- ok( (0 == strcmp("", buf)) || (0 == strcmp(sEnvvar2, buf)),
- "Expected empty or first part of the string \"%s\", got \"%s\"\n", sEnvvar2, buf);
+ ok( (0 == strcmp("", buf)) || (0 == strcmp(sEnvvar2, buf)) ||
+ broken(0 == strcmp(sTestpath2, buf)), /* IE 5.5 */
+ "Expected empty or first part of the string \"%s\", got \"%s\"\n", sEnvvar2, buf);
}
- ok( dwSize >= nUsedBuffer2, "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
+ ok( dwSize >= nUsedBuffer2 ||
+ broken(dwSize == (strlen(sEnvvar2) + 1)) || /* IE4.01 SP1 (W98) and IE5 (W98SE) */
+ broken(dwSize == (strlen("") + 1)), /* IE4.01 (NT4) and IE5.x (W2K) */
+ "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
/*
dwType = -1;
dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, NULL, &dwSize);
ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
- ok( dwSize >= nUsedBuffer2, "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
+ ok( dwSize >= nUsedBuffer2 ||
+ broken(dwSize == (strlen(sTestpath2) + 1)), /* IE4.01 SP1 (Win98) */
+ "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
RegCloseKey(hKey);
if (!pStrFormatByteSize64A)
{
- skip("StrFormatByteSize64A() is not available. Tests skipped\n");
+ win_skip("StrFormatByteSize64A() is not available\n");
return;
}
if (!pStrFormatKBSizeW)
{
- skip("StrFormatKBSizeW() is not available. Tests skipped\n");
+ win_skip("StrFormatKBSizeW() is not available\n");
return;
}
if (!pStrFormatKBSizeA)
{
- skip("StrFormatKBSizeA() is not available. Tests skipped\n");
+ win_skip("StrFormatKBSizeA() is not available\n");
return;
}
ok(!pStrIsIntlEqualA(TRUE, str1, str2, 5), "StrIsIntlEqualA(TRUE,...) isn't case-sensitive\n");
}
else
- skip("StrIsIntlEqualA() is not available. Tests skipped\n");
+ win_skip("StrIsIntlEqualA() is not available\n");
if (pIntlStrEqWorkerA)
{
ok(!pIntlStrEqWorkerA(TRUE, str1, str2, 5), "pIntlStrEqWorkerA(TRUE,...) isn't case-sensitive\n");
}
else
- skip("IntlStrEqWorkerA() is not available. Tests skipped\n");
+ win_skip("IntlStrEqWorkerA() is not available\n");
}
static void test_StrCmpW(void)
ok(!pStrIsIntlEqualW(TRUE, str1, str2, 5), "StrIsIntlEqualW(TRUE,...) isn't case-sensitive\n");
}
else
- skip("StrIsIntlEqualW() is not available. Tests skipped\n");
+ win_skip("StrIsIntlEqualW() is not available\n");
if (pIntlStrEqWorkerW)
{
ok(!pIntlStrEqWorkerW(TRUE, str1, str2, 5), "IntlStrEqWorkerW(TRUE,...) isn't case-sensitive\n");
}
else
- skip("IntlStrEqWorkerW() is not available. Tests skipped\n");
+ win_skip("IntlStrEqWorkerW() is not available\n");
}
static WCHAR *CoDupStrW(const char* src)
if (!pStrRetToBSTR)
{
- skip("StrRetToBSTR() is not available. Tests skipped\n");
+ win_skip("StrRetToBSTR() is not available\n");
return;
}
if (!pStrCpyNXA)
{
- skip("StrCpyNXA() is not available. Tests skipped\n");
+ win_skip("StrCpyNXA() is not available\n");
return;
}
if (!pStrCpyNXW)
{
- skip("StrCpyNXW() is not available. Tests skipped\n");
+ win_skip("StrCpyNXW() is not available\n");
return;
}
if (!pSHAnsiToAnsi)
{
- skip("SHAnsiToAnsi() is not available. Tests skipped\n");
+ win_skip("SHAnsiToAnsi() is not available\n");
return;
}
if (!pSHUnicodeToUnicode)
{
- skip("SHUnicodeToUnicode() is not available. Tests skipped\n");
+ win_skip("SHUnicodeToUnicode() is not available\n");
return;
}
expect_eq(buf[100], '\xbf', CHAR, "%x");
}
else
- skip("StrCatBuffA() is not available. Tests skipped\n");
+ win_skip("StrCatBuffA() is not available\n");
memset(wbuf, 0xbf, sizeof(wbuf));
expect_eq(StrCpyNW(wbuf, wstr1, 10), wbuf, PWCHAR, "%p");
expect_eq(wbuf[100], (WCHAR)0xbfbf, WCHAR, "%x");
}
else
- skip("StrCatBuffW() is not available. Tests skipped\n");
+ win_skip("StrCatBuffW() is not available\n");
if (pStrRetToBufW)
{
expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x");
}
else
- skip("StrRetToBufW() is not available. Tests skipped\n");
+ win_skip("StrRetToBufW() is not available\n");
if (pStrRetToBufA)
{
expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x");
}
else
- skip("StrRetToBufA() is not available. Tests skipped\n");
+ win_skip("StrRetToBufA() is not available\n");
if (pwnsprintfA)
{
expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x");
}
else
- skip("wnsprintfA() is not available. Tests skipped\n");
+ win_skip("wnsprintfA() is not available\n");
if (pwnsprintfW)
{
expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x");
}
else
- skip("wnsprintfW() is not available. Tests skipped\n");
+ win_skip("wnsprintfW() is not available\n");
}
START_TEST(string)