Author: cwittich Date: Wed Apr 29 18:59:03 2009 New Revision: 40732
URL: http://svn.reactos.org/svn/reactos?rev=40732&view=rev Log: sync shlwapi_winetest with wine 1.1.20
Modified: trunk/rostests/winetests/shlwapi/ordinal.c trunk/rostests/winetests/shlwapi/path.c trunk/rostests/winetests/shlwapi/shreg.c trunk/rostests/winetests/shlwapi/string.c
Modified: trunk/rostests/winetests/shlwapi/ordinal.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/ordinal.... ============================================================================== --- trunk/rostests/winetests/shlwapi/ordinal.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/ordinal.c [iso-8859-1] Wed Apr 29 18:59:03 2009 @@ -380,7 +380,9 @@ }
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");
@@ -390,6 +392,11 @@ { /* The previous calls to GetShellSecurityDescriptor don't set the last error */ 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"); @@ -464,7 +471,7 @@ 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)); @@ -475,7 +482,7 @@ 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);
Modified: trunk/rostests/winetests/shlwapi/path.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/path.c?r... ============================================================================== --- trunk/rostests/winetests/shlwapi/path.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/path.c [iso-8859-1] Wed Apr 29 18:59:03 2009 @@ -392,8 +392,12 @@ /* 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);
@@ -406,7 +410,9 @@
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; @@ -465,7 +471,9 @@ 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 */ @@ -481,15 +489,23 @@ 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 */ @@ -577,7 +593,9 @@ 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 */ @@ -585,7 +603,9 @@ 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); @@ -598,7 +618,9 @@ 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()); }
@@ -764,7 +786,9 @@ 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"); @@ -774,7 +798,9 @@ 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); @@ -784,7 +810,9 @@ 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()); }
@@ -810,7 +838,9 @@ 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); @@ -903,7 +933,9 @@ 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 */,
Modified: trunk/rostests/winetests/shlwapi/shreg.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/shreg.c?... ============================================================================== --- trunk/rostests/winetests/shlwapi/shreg.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/shreg.c [iso-8859-1] Wed Apr 29 18:59:03 2009 @@ -122,8 +122,12 @@ 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; @@ -196,7 +200,9 @@ 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 @@ -208,7 +214,9 @@ 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 @@ -220,8 +228,12 @@ 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 @@ -233,7 +245,10 @@ 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 { @@ -241,7 +256,9 @@ "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);
/* @@ -254,15 +271,22 @@ 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);
/* @@ -273,7 +297,9 @@ 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);
Modified: trunk/rostests/winetests/shlwapi/string.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/string.c... ============================================================================== --- trunk/rostests/winetests/shlwapi/string.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/string.c [iso-8859-1] Wed Apr 29 18:59:03 2009 @@ -504,7 +504,7 @@
if (!pStrFormatByteSize64A) { - skip("StrFormatByteSize64A() is not available. Tests skipped\n"); + win_skip("StrFormatByteSize64A() is not available\n"); return; }
@@ -528,7 +528,7 @@
if (!pStrFormatKBSizeW) { - skip("StrFormatKBSizeW() is not available. Tests skipped\n"); + win_skip("StrFormatKBSizeW() is not available\n"); return; }
@@ -550,7 +550,7 @@
if (!pStrFormatKBSizeA) { - skip("StrFormatKBSizeA() is not available. Tests skipped\n"); + win_skip("StrFormatKBSizeA() is not available\n"); return; }
@@ -596,7 +596,7 @@ 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) { @@ -604,7 +604,7 @@ 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) @@ -623,7 +623,7 @@ 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) { @@ -631,7 +631,7 @@ 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) @@ -652,7 +652,7 @@
if (!pStrRetToBSTR) { - skip("StrRetToBSTR() is not available. Tests skipped\n"); + win_skip("StrRetToBSTR() is not available\n"); return; }
@@ -690,7 +690,7 @@
if (!pStrCpyNXA) { - skip("StrCpyNXA() is not available. Tests skipped\n"); + win_skip("StrCpyNXA() is not available\n"); return; }
@@ -711,7 +711,7 @@
if (!pStrCpyNXW) { - skip("StrCpyNXW() is not available. Tests skipped\n"); + win_skip("StrCpyNXW() is not available\n"); return; }
@@ -768,7 +768,7 @@
if (!pSHAnsiToAnsi) { - skip("SHAnsiToAnsi() is not available. Tests skipped\n"); + win_skip("SHAnsiToAnsi() is not available\n"); return; }
@@ -789,7 +789,7 @@
if (!pSHUnicodeToUnicode) { - skip("SHUnicodeToUnicode() is not available. Tests skipped\n"); + win_skip("SHUnicodeToUnicode() is not available\n"); return; }
@@ -829,7 +829,7 @@ 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"); @@ -843,7 +843,7 @@ 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) { @@ -855,7 +855,7 @@ 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) { @@ -867,7 +867,7 @@ 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) { @@ -878,7 +878,7 @@ 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) { @@ -889,7 +889,7 @@ 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)