Hi,
Fixes for msvc warnings and xp failures when run with no net
connection.
The test removed from dlls/kernel/tests/file.c is dependent on the
current
directory and so was removed.
Cheers,
Jon
Changelog:
Jon Griffiths <jon_p_griffiths@yahoo.com>
+dlls/advapi32/tests/registry.c dlls/kernel/tests/console.c
dlls/kernel/tests/file.c dlls/msvcrt/tests/scanf.c
dlls/netapi32/tests/access.c dlls/netapi32/tests/wksta.c
dlls/ntdll/tests/rtlstr.c dlls/shlwapi/tests/clist.c
dlls/shlwapi/tests/path.c dlls/wininet/tests/http.c
Various test fixes for XP/msvc.
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--- wine/dlls/advapi32/tests/registry.c 2003-09-11 17:10:51.000000000 +0100
+++ wine-develop/dlls/advapi32/tests/registry.c 2003-09-21 03:14:46.000000000 +0100
@@ -96,8 +96,11 @@
ok( val_count == 2 || val_count == 3, "val_count set to %ld", val_count );
ok( data_count == 7, "data_count set to %ld instead of 7", data_count );
ok( type == REG_SZ, "type %ld is not REG_SZ", type );
+#if 0
+ /* v5.1.2600.0 (XP Home) does not touch value or data in this case */
ok( !strcmp( value, "Te" ), "value set to '%s' instead of 'Te'", value );
ok( !strcmp( data, "foobar" ), "data set to '%s' instead of 'foobar'", data );
+#endif
/* overflow empty name */
val_count = 0;
@@ -111,7 +114,10 @@
ok( data_count == 7, "data_count set to %ld instead of 7", data_count );
ok( type == REG_SZ, "type %ld is not REG_SZ", type );
ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'", value );
+#if 0
+ /* v5.1.2600.0 (XP Home) does not touch data in this case */
ok( !strcmp( data, "foobar" ), "data set to '%s' instead of 'foobar'", data );
+#endif
/* overflow data */
val_count = 20;
--- wine/dlls/kernel/tests/console.c 2003-07-04 18:46:35.000000000 +0100
+++ wine-develop/dlls/kernel/tests/console.c 2003-09-23 15:38:01.000000000 +0100
@@ -23,12 +23,12 @@
#include <stdio.h>
/* DEFAULT_ATTRIB is used for all initial filling of the console.
- * all modifications are made with TEST_ATTRIB so that we could check
- * what has to be modified or not
+ * all modifications are made with TEST_ATTRIB so that we could check
+ * what has to be modified or not
*/
#define TEST_ATTRIB (BACKGROUND_BLUE | FOREGROUND_GREEN)
#define DEFAULT_ATTRIB (FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED)
-/* when filling the screen with non-blank chars, this macro defines
+/* when filling the screen with non-blank chars, this macro defines
* what character should be at position 'c'
*/
#define CONTENT(c) ('A' + (((c).Y * 17 + (c).X) % 23))
@@ -56,7 +56,7 @@
WORD attr = DEFAULT_ATTRIB;
char ch;
DWORD len;
-
+
for (c.X = 0; c.X < sbSize.X; c.X++)
{
for (c.Y = 0; c.Y < sbSize.Y; c.Y++)
@@ -70,27 +70,27 @@
static void testCursor(HANDLE hCon, COORD sbSize)
{
- COORD c;
-
+ COORD c = { 0, 0 };
+
ok(SetConsoleCursorPosition(0, c) == 0, "No handle");
ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %lu",
ERROR_INVALID_HANDLE, GetLastError());
-
+
c.X = c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left");
okCURSOR(hCon, c);
-
+
c.X = sbSize.X - 1;
c.Y = sbSize.Y - 1;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in lower-right");
okCURSOR(hCon, c);
-
+
c.X = sbSize.X;
c.Y = sbSize.Y - 1;
ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu",
ERROR_INVALID_PARAMETER, GetLastError());
-
+
c.X = sbSize.X - 1;
c.Y = sbSize.Y;
ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside");
@@ -115,19 +115,19 @@
COORD c;
DWORD len;
const char* mytest = "abcdefg";
- const size_t mylen = strlen(mytest);
-
+ const int mylen = strlen(mytest);
+
/* single line write */
c.X = c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
c.Y = 0;
for (c.X = 0; c.X < mylen; c.X++)
{
okCHAR(hCon, c, mytest[c.X], TEST_ATTRIB);
}
-
+
okCURSOR(hCon, c);
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
}
@@ -137,16 +137,16 @@
COORD c;
DWORD len, mode;
const char* mytest = "abcd\nf\tg";
- const size_t mylen = strlen(mytest);
+ const int mylen = strlen(mytest);
int p;
-
- ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, mode & ~(ENABLE_PROCESSED_OUTPUT|ENABLE_WRAP_AT_EOL_OUTPUT)),
+
+ ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, mode & ~(ENABLE_PROCESSED_OUTPUT|ENABLE_WRAP_AT_EOL_OUTPUT)),
"clearing wrap at EOL & processed output");
-
+
/* write line, wrapping disabled, buffer exceeds sb width */
c.X = sbSize.X - 3; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
c.Y = 0;
for (p = mylen - 3; p < mylen; p++)
@@ -157,15 +157,15 @@
c.X = 0; c.Y = 1;
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
-
+
p = sbSize.X - 3 + mylen % 3;
c.X = p; c.Y = 0;
okCURSOR(hCon, c);
-
+
/* write line, wrapping disabled, strings end on end of line */
c.X = sbSize.X - mylen; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
c.Y = 0;
for (p = 0; p < mylen; p++)
@@ -173,10 +173,10 @@
c.X = sbSize.X - mylen + p;
okCHAR(hCon, c, mytest[p], TEST_ATTRIB);
}
-
+
c.X = 0; c.Y = 1;
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
-
+
p = sbSize.X - mylen;
c.X = p; c.Y = 0;
okCURSOR(hCon, c);
@@ -187,17 +187,17 @@
COORD c;
DWORD len, mode;
const char* mytest = "abcd\nf\tg";
- const size_t mylen = strlen(mytest);
- const size_t mylen2 = strchr(mytest, '\n') - mytest;
+ const int mylen = strlen(mytest);
+ const int mylen2 = strchr(mytest, '\n') - mytest;
int p;
-
- ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, (mode | ENABLE_PROCESSED_OUTPUT) & ~ENABLE_WRAP_AT_EOL_OUTPUT),
+
+ ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, (mode | ENABLE_PROCESSED_OUTPUT) & ~ENABLE_WRAP_AT_EOL_OUTPUT),
"clearing wrap at EOL & setting processed output");
-
+
/* write line, wrapping disabled, buffer exceeds sb width */
c.X = sbSize.X - 5; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-5");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
c.Y = 0;
for (c.X = sbSize.X - 5; c.X < sbSize.X - 1; c.X++)
@@ -205,7 +205,7 @@
okCHAR(hCon, c, mytest[c.X - sbSize.X + 5], TEST_ATTRIB);
}
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
-
+
c.X = 0; c.Y++;
okCHAR(hCon, c, mytest[5], TEST_ATTRIB);
for (c.X = 1; c.X < 8; c.X++)
@@ -213,13 +213,13 @@
okCHAR(hCon, c, mytest[7], TEST_ATTRIB);
c.X++;
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
-
+
okCURSOR(hCon, c);
-
+
/* write line, wrapping disabled, strings end on end of line */
c.X = sbSize.X - 4; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-4");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
c.Y = 0;
for (c.X = sbSize.X - 4; c.X < sbSize.X; c.X++)
@@ -233,13 +233,13 @@
okCHAR(hCon, c, mytest[7], TEST_ATTRIB);
c.X++;
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
-
+
okCURSOR(hCon, c);
-
+
/* write line, wrapping disabled, strings end after end of line */
c.X = sbSize.X - 3; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-4");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
c.Y = 0;
for (p = mylen2 - 3; p < mylen2; p++)
@@ -254,7 +254,7 @@
okCHAR(hCon, c, mytest[7], TEST_ATTRIB);
c.X++;
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
-
+
okCURSOR(hCon, c);
}
@@ -263,16 +263,16 @@
COORD c;
DWORD len, mode;
const char* mytest = "abcd\nf\tg";
- const size_t mylen = strlen(mytest);
+ const int mylen = strlen(mytest);
int p;
-
- ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon,(mode | ENABLE_WRAP_AT_EOL_OUTPUT) & ~(ENABLE_PROCESSED_OUTPUT)),
+
+ ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon,(mode | ENABLE_WRAP_AT_EOL_OUTPUT) & ~(ENABLE_PROCESSED_OUTPUT)),
"setting wrap at EOL & clearing processed output");
-
+
/* write line, wrapping enabled, buffer doesn't exceed sb width */
c.X = sbSize.X - 9; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-9");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
c.Y = 0;
for (p = 0; p < mylen; p++)
@@ -284,11 +284,11 @@
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
c.X = 0; c.Y = 1;
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
-
+
/* write line, wrapping enabled, buffer does exceed sb width */
c.X = sbSize.X - 3; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
c.Y = 0;
for (p = 0; p < 3; p++)
@@ -296,7 +296,7 @@
c.X = sbSize.X - 3 + p;
okCHAR(hCon, c, mytest[p], TEST_ATTRIB);
}
-
+
c.Y = 1;
for (p = 0; p < mylen - 3; p++)
{
@@ -305,7 +305,7 @@
}
c.X = mylen - 3;
okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
-
+
okCURSOR(hCon, c);
}
@@ -314,16 +314,16 @@
COORD c;
DWORD len, mode;
const char* mytest = "abcd\nf\tg";
- const size_t mylen = strlen(mytest);
+ const int mylen = strlen(mytest);
int p;
-
- ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, mode | (ENABLE_WRAP_AT_EOL_OUTPUT|ENABLE_PROCESSED_OUTPUT)),
+
+ ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, mode | (ENABLE_WRAP_AT_EOL_OUTPUT|ENABLE_PROCESSED_OUTPUT)),
"setting wrap at EOL & processed output");
-
+
/* write line, wrapping enabled, buffer doesn't exceed sb width */
c.X = sbSize.X - 9; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-9");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
for (p = 0; p < 4; p++)
{
@@ -344,7 +344,7 @@
/* write line, wrapping enabled, buffer does exceed sb width */
c.X = sbSize.X - 3; c.Y = 2;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3");
-
+
ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole");
for (p = 0; p < 3; p++)
{
@@ -394,7 +394,7 @@
/* no clipping, src & dst rect don't overlap */
resetContent(hCon, sbSize, TRUE);
-
+
#define IN_SRECT(r,c) ((r).Left <= (c).X && (c).X <= (r).Right && (r).Top <= (c).Y && (c).Y <= (r).Bottom)
#define IN_SRECT2(r,d,c) ((d).X <= (c).X && (c).X <= (d).X + (r).Right - (r).Left && (d).Y <= (c).Y && (c).Y <= (d).Y + (r).Bottom - (r).Top)
@@ -424,7 +424,7 @@
tc.Y = c.Y - dst.Y;
okCHAR(hCon, c, CONTENT(tc), DEFAULT_ATTRIB);
}
- else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c))
+ else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c))
okCHAR(hCon, c, '#', TEST_ATTRIB);
else okCHAR(hCon, c, CONTENT(c), DEFAULT_ATTRIB);
}
@@ -466,7 +466,7 @@
/* clipping, src & dst rect don't overlap */
resetContent(hCon, sbSize, TRUE);
-
+
scroll.Left = 0;
scroll.Right = W - 1;
scroll.Top = 0;
@@ -493,7 +493,7 @@
tc.Y = c.Y - dst.Y;
okCHAR(hCon, c, CONTENT(tc), DEFAULT_ATTRIB);
}
- else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c))
+ else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c))
okCHAR(hCon, c, '#', TEST_ATTRIB);
else okCHAR(hCon, c, CONTENT(c), DEFAULT_ATTRIB);
}
@@ -501,7 +501,7 @@
/* clipping, src & dst rect do overlap */
resetContent(hCon, sbSize, TRUE);
-
+
scroll.Left = 0;
scroll.Right = W - 1;
scroll.Top = 0;
@@ -528,7 +528,7 @@
tc.Y = c.Y - dst.Y;
okCHAR(hCon, c, CONTENT(tc), DEFAULT_ATTRIB);
}
- else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c))
+ else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c))
okCHAR(hCon, c, '#', TEST_ATTRIB);
else okCHAR(hCon, c, CONTENT(c), DEFAULT_ATTRIB);
}
@@ -542,7 +542,7 @@
BOOL ret;
CONSOLE_SCREEN_BUFFER_INFO sbi;
- /* be sure we have a clean console (and that's our own)
+ /* be sure we have a clean console (and that's our own)
* FIXME: this will make the test fail (currently) if we don't run
* under X11
* Another solution would be to rerun the test under wineconsole with
--- wine/dlls/kernel/tests/file.c 2003-09-17 14:37:20.000000000 +0100
+++ wine-develop/dlls/kernel/tests/file.c 2003-09-23 15:44:24.000000000 +0100
@@ -695,7 +695,7 @@
WIN32_FIND_DATAA fd;
char temppath[MAX_PATH];
HANDLE hFind;
-
+
lstrcpyA(temppath, tempdir);
lstrcatA(temppath, "\\*.*");
hFind = FindFirstFileA(temppath, &fd);
@@ -902,11 +902,6 @@
WIN32_FIND_DATAA search_results;
int err;
- handle = FindFirstFileA("C:",&search_results);
- err = GetLastError();
- ok ( handle == INVALID_HANDLE_VALUE , "FindFirstFile on Root directory should Fail");
- if (handle == INVALID_HANDLE_VALUE)
- ok ( err == ERROR_FILE_NOT_FOUND, "Bad Error number\n");
handle = FindFirstFileA("C:\\",&search_results);
err = GetLastError();
ok ( handle == INVALID_HANDLE_VALUE , "FindFirstFile on Root directory should Fail");
--- wine/dlls/msvcrt/tests/scanf.c 2003-05-31 13:37:31.000000000 +0100
+++ wine-develop/dlls/msvcrt/tests/scanf.c 2003-09-23 15:46:58.000000000 +0100
@@ -27,7 +27,7 @@
char buffer[100], buffer1[100];
char format[20];
int result, ret;
- float res1= -82.6267, res2= 27.76, res11, res12;
+ float res1= -82.6267f, res2= 27.76f, res11, res12;
char pname[]=" St. Petersburg, Florida\n";
--- wine/dlls/netapi32/tests/access.c 2003-09-11 17:11:05.000000000 +0100
+++ wine-develop/dlls/netapi32/tests/access.c 2003-09-23 15:51:53.000000000 +0100
@@ -106,8 +106,9 @@
ok(rc == NERR_UserNotFound,"Invalid User Name: rc=%ld",rc);
todo_wine {
/* FIXME - Currently Wine can't verify whether the network path is good or bad */
- rc=pNetUserGetInfo(sBadNetPath, sAdminUserName, 0, (LPBYTE *)&ui0);
- ok(rc == ERROR_BAD_NETPATH,"Bad Network Path: rc=%ld",rc);
+ rc=pNetUserGetInfo(sBadNetPath, sAdminUserName, 0, (LPBYTE *)&ui0);
+ ok(rc == ERROR_BAD_NETPATH || rc == ERROR_NETWORK_UNREACHABLE,
+ "Bad Network Path: rc=%ld",rc);
}
rc=pNetUserGetInfo(sEmptyStr, sAdminUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_BAD_NETPATH,"Bad Network Path: rc=%ld",rc);
--- wine/dlls/netapi32/tests/wksta.c 2003-09-11 17:11:06.000000000 +0100
+++ wine-develop/dlls/netapi32/tests/wksta.c 2003-09-23 15:55:44.000000000 +0100
@@ -136,7 +136,8 @@
/* 1st check: is param 2 (level) correct? (only if param 5 passed?) */
apiReturn = pNetWkstaTransportEnum(NULL, 1, NULL, MAX_PREFERRED_LENGTH,
NULL, &totalEntries, NULL);
- ok(apiReturn == ERROR_INVALID_LEVEL, "Invalid level");
+ ok(apiReturn == ERROR_INVALID_LEVEL || apiReturn == ERROR_INVALID_PARAMETER,
+ "NetWkstaTransportEnum returned %ld", apiReturn);
/* 2nd check: is param 5 passed? (only if level passes?) */
apiReturn = pNetWkstaTransportEnum(NULL, 0, NULL, MAX_PREFERRED_LENGTH,
@@ -146,12 +147,14 @@
if (apiReturn == ERROR_NETWORK_UNREACHABLE)
return;
- ok(apiReturn == STATUS_ACCESS_VIOLATION, "access violation");
+ ok(apiReturn == STATUS_ACCESS_VIOLATION || apiReturn == ERROR_INVALID_PARAMETER,
+ "NetWkstaTransportEnum returned %ld", apiReturn);
/* 3rd check: is param 3 passed? */
apiReturn = pNetWkstaTransportEnum(NULL, 0, NULL, MAX_PREFERRED_LENGTH,
NULL, NULL, NULL);
- ok(apiReturn == STATUS_ACCESS_VIOLATION, "STATUS_ACCESS_VIOLATION");
+ ok(apiReturn == STATUS_ACCESS_VIOLATION || apiReturn == ERROR_INVALID_PARAMETER,
+ "NetWkstaTransportEnum returned %ld", apiReturn);
/* 4th check: is param 6 passed? */
apiReturn = pNetWkstaTransportEnum(NULL, 0, &bufPtr, MAX_PREFERRED_LENGTH,
@@ -161,7 +164,8 @@
/* final check: valid return, actually get data back */
apiReturn = pNetWkstaTransportEnum(NULL, 0, &bufPtr, MAX_PREFERRED_LENGTH,
&entriesRead, &totalEntries, NULL);
- ok(apiReturn == NERR_Success, "NetWkstaTransportEnum is successful");
+ ok(apiReturn == NERR_Success || apiReturn == ERROR_NETWORK_UNREACHABLE,
+ "NetWkstaTransportEnum returned %ld", apiReturn);
if (apiReturn == NERR_Success) {
/* WKSTA_TRANSPORT_INFO_0 *transports = (WKSTA_TRANSPORT_INFO_0 *)bufPtr; */
--- wine/dlls/ntdll/tests/rtlstr.c 2003-09-11 17:11:07.000000000 +0100
+++ wine-develop/dlls/ntdll/tests/rtlstr.c 2003-09-23 15:49:12.000000000 +0100
@@ -434,7 +434,7 @@
dest_ansi_str.Length = dest_str.Length / sizeof(WCHAR);
dest_ansi_str.MaximumLength = dest_ansi_str.Length + 1;
for (pos = 0; pos < dest_ansi_str.Length; pos++) {
- dest_ansi_buf[pos] = dest_buf[pos];
+ dest_ansi_buf[pos] = (char)dest_buf[pos];
} /* for */
dest_ansi_buf[dest_ansi_str.Length] = '\0';
dest_ansi_str.Buffer = dest_ansi_buf;
@@ -1286,7 +1286,7 @@
{ 0, "-xFEDCBA00", 0, STATUS_SUCCESS}, /* Negative Hexadecimal (x-notation) */
{ 0, "0x89abcdef", 0x89abcdef, STATUS_SUCCESS}, /* Hex with lower case digits a-f (0x-notation) */
{ 0, "0xFEDCBA00", 0xFEDCBA00, STATUS_SUCCESS}, /* Hex with upper case digits A-F (0x-notation) */
- { 0, "-0xFEDCBA00", -0xFEDCBA00, STATUS_SUCCESS}, /* Negative Hexadecimal (0x-notation) */
+ { 0, "-0xFEDCBA00", 19088896, STATUS_SUCCESS}, /* Negative Hexadecimal (0x-notation) */
{ 0, "0xabcdefgh", 0xabcdef, STATUS_SUCCESS}, /* Hex with illegal lower case digits (g-z) */
{ 0, "0xABCDEFGH", 0xABCDEF, STATUS_SUCCESS}, /* Hex with illegal upper case digits (G-Z) */
{ 0, "0xF", 0xf, STATUS_SUCCESS}, /* one digit hexadecimal */
--- wine/dlls/shlwapi/tests/clist.c 2003-09-11 17:11:13.000000000 +0100
+++ wine-develop/dlls/shlwapi/tests/clist.c 2003-09-21 05:41:16.000000000 +0100
@@ -299,13 +299,13 @@
inserted = pSHLWAPI_22(list, item->ulId);
ok(inserted != NULL, "lost after adding");
- ok(!inserted || inserted->ulId != -1, "find returned a container");
+ ok(!inserted || inserted->ulId != ~0UL, "find returned a container");
/* Check size */
if (inserted && inserted->ulSize & 0x3)
{
/* Contained */
- ok(inserted[-1].ulId == -1, "invalid size is not countained");
+ ok(inserted[-1].ulId == ~0UL, "invalid size is not countained");
ok(inserted[-1].ulSize > inserted->ulSize+sizeof(SHLWAPI_CLIST),
"container too small");
}
@@ -374,7 +374,7 @@
inserted = (LPSHLWAPI_CLIST)buff;
inserted->ulSize = 44;
- inserted->ulId = -1;
+ inserted->ulId = ~0UL;
hRet = pSHLWAPI_20(&list, inserted);
/* The call succeeds but the item is not inserted */
ok(hRet == S_OK, "failed adding a container");
@@ -419,13 +419,13 @@
inserted = pSHLWAPI_22(list, item->ulId);
ok(inserted != NULL, "lost after adding");
- ok(!inserted || inserted->ulId != -1, "find returned a container");
+ ok(!inserted || inserted->ulId != ~0UL, "find returned a container");
/* Check size */
if (inserted && inserted->ulSize & 0x3)
{
/* Contained */
- ok(inserted[-1].ulId == -1, "invalid size is not countained");
+ ok(inserted[-1].ulId == ~0UL, "invalid size is not countained");
ok(inserted[-1].ulSize > inserted->ulSize+sizeof(SHLWAPI_CLIST),
"container too small");
}
--- wine/dlls/shlwapi/tests/path.c 2003-09-11 17:11:13.000000000 +0100
+++ wine-develop/dlls/shlwapi/tests/path.c 2003-09-21 14:24:24.000000000 +0100
@@ -92,7 +92,10 @@
FreeWideString(wszUrl);
FreeWideString(wszConvertedPart);
- ok(strcmp(szPart,szExpected)==0, "Expected %s, but got %s", szExpected, szPart);
+ /* Note that v6.0 and later don't return '?' with the query */
+ ok(strcmp(szPart,szExpected)==0 ||
+ (*szExpected=='?' && !strcmp(szPart,szExpected+1)),
+ "Expected %s, but got %s", szExpected, szPart);
}
static void test_UrlGetPart(void)
--- wine/dlls/wininet/tests/http.c 2003-09-11 17:11:18.000000000 +0100
+++ wine-develop/dlls/wininet/tests/http.c 2003-09-23 16:00:10.000000000 +0100
@@ -124,13 +124,15 @@
if (hor == 0x0) goto abort;
- trace("HttpSendRequestA -->\n");
+ trace("HttpSendRequestA -->\n");
+ SetLastError(0);
rc = HttpSendRequestA(hor, "", 0xffffffff,0x0,0x0);
if (flags)
ok(((rc == 0)&&(GetLastError()==997)),
"Asyncronous HttpSendRequest NOT returning 0 with error 997");
else
- ok((rc != 0), "Syncronous HttpSendRequest returning 0");
+ ok((rc != 0) || GetLastError() == 12007, /* 12007 == XP */
+ "Syncronous HttpSendRequest returning 0, error %ld", GetLastError());
trace("HttpSendRequestA <--\n");
while ((flags)&&(!goon))
@@ -232,9 +234,12 @@
urlComponents.lpszExtraInfo = extra;
urlComponents.dwExtraInfoLength = 1024;
ok((InternetCrackUrl("http://LTspice.linear-tech.com/fieldsync2/release.log.gz", 0,0,&urlComponents)),
- "InternetCrackUrl failed, error %lx\n",GetLastError());
+ "InternetCrackUrl failed, error %lx\n",GetLastError());
+ SetLastError(0);
myhttp = InternetOpenUrl(myhinternet, "http://LTspice.linear-tech.com/fieldsync2/release.log.gz", 0, 0,
- INTERNET_FLAG_RELOAD|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_FLAG_TRANSFER_BINARY,0);
+ INTERNET_FLAG_RELOAD|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_FLAG_TRANSFER_BINARY,0);
+ if (GetLastError() == 12007)
+ return; /* WinXP returns this when not connected to the net */
ok((myhttp != 0),"InternetOpenUrl failed, error %lx\n",GetLastError());
ok(InternetReadFile(myhttp, buffer,0x400,&readbytes), "InternetReadFile failed, error %lx\n",GetLastError());
totalbytes += readbytes;