[PATCH] shlwapi/tests: Fix some tests on win95
Detlef Riekenberg
wine.dev at web.de
Wed Sep 17 16:03:06 CDT 2008
---
dlls/shlwapi/tests/shreg.c | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c
index 873c196..b8af165 100644
--- a/dlls/shlwapi/tests/shreg.c
+++ b/dlls/shlwapi/tests/shreg.c
@@ -219,7 +219,9 @@ static void test_SHQUeryValueEx(void)
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);
+ /* win95 does no expansion */
+ ok( REG_SZ == dwType || broken(REG_EXPAND_SZ == dwType),
+ "Expected REG_SZ, got (%u)\n", dwType);
/*
* string grows during expanding
@@ -231,8 +233,11 @@ static void test_SHQUeryValueEx(void)
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);
+ /* win95 does no expansion */
+ ok( dwSize >= nUsedBuffer2 || broken(REG_EXPAND_SZ == dwType),
+ "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
+ ok( REG_SZ == dwType || broken(REG_EXPAND_SZ == dwType),
+ "Expected REG_SZ, got (%u)\n", dwType);
/*
* string grows during expanding
@@ -244,7 +249,9 @@ static void test_SHQUeryValueEx(void)
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);
+ /* win95: ERROR_PROC_NOT_FOUND */
+ ok( ERROR_MORE_DATA == dwRet || broken(ERROR_PROC_NOT_FOUND == dwRet),
+ "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
todo_wine
{
@@ -265,12 +272,16 @@ static void test_SHQUeryValueEx(void)
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);
+ /* win95: ERROR_PROC_NOT_FOUND */
+ ok( ERROR_MORE_DATA == dwRet || broken(ERROR_PROC_NOT_FOUND == dwRet),
+ "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);
+ /* win95 does no expansion */
+ ok( (0 == strcmp("", buf)) || (0 == strcmp(sEnvvar2, buf)) ||
+ broken((0 == strcmp(sTestpath2, buf))),
+ "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);
--
1.5.4.3
--=-/F/NgG6tPnPW2yqZGc/r--
More information about the wine-patches
mailing list