Author: akhaldi
Date: Tue Dec 11 13:42:40 2012
New Revision: 57880
URL:
http://svn.reactos.org/svn/reactos?rev=57880&view=rev
Log:
[LOCALUI_WINETEST]: Sync with Wine 1.5.19.
Modified:
trunk/rostests/winetests/localui/localui.c
Modified: trunk/rostests/winetests/localui/localui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/localui/localui…
==============================================================================
--- trunk/rostests/winetests/localui/localui.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/localui/localui.c [iso-8859-1] Tue Dec 11 13:42:40 2012
@@ -71,9 +71,14 @@
if (!pi_buffer) {
res = EnumPortsW(NULL, 2, NULL, 0, &pi_needed, &pi_numports);
+ if (!res && (GetLastError() == RPC_S_SERVER_UNAVAILABLE)) {
+ win_skip("The service 'Spooler' is required for many
tests\n");
+ return NULL;
+ }
+ ok(!res, "EnumPorts succeeded: got %d\n", res);
pi_buffer = HeapAlloc(GetProcessHeap(), 0, pi_needed);
- SetLastError(0xdeadbeef);
res = EnumPortsW(NULL, 2, pi_buffer, pi_needed, &pi_needed,
&pi_numports);
+ ok(res == 1, "EnumPorts failed: got %d\n", res);
}
if (pi_buffer) {
pi = (PORT_INFO_2W *) pi_buffer;
@@ -160,12 +165,12 @@
SetLastError(0xdeadbeef);
new_portname = NULL;
/*
- * - On MSDN, you can read, that no dialogs should be displayed, when hWnd
+ * - On MSDN, you can read that no dialog should be displayed when hWnd
* is NULL, but native localui does not care
- * - when the new port already exist,
+ * - When the new port already exists,
* TRUE is returned, but new_portname is NULL
- * - when the new port starts with "COM" or "LPT",
- * FALSE is returned with ERROR_NOT_SUPPORTED in windows
+ * - When the new port starts with "COM" or "LPT",
+ * FALSE is returned with ERROR_NOT_SUPPORTED on windows
*/
res = pAddPortUI(NULL, NULL, localportW, &new_portname);
ok( res ||
@@ -292,7 +297,13 @@
}
}
- /* find installed Ports */
+ /* find installed ports */
+
+ /* "FILE:" */
+ file_present = find_portinfo2(portname_fileW);
+
+ if (!pi_numports) /* Nothing to test without a port */
+ return;
id = 0;
/* "LPT1:" - "LPT9:" */
@@ -316,9 +327,6 @@
if (!pi2 && (com_absent == NULL)) com_absent = strdupW(bufferW);
}
- /* "FILE:" */
- file_present = find_portinfo2(portname_fileW);
-
test_AddPortUI();
test_ConfigurePortUI();