Commit f9402b87 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

winspool/tests: Use a more generic name for a variable.

parent e6b1bd5f
...@@ -44,7 +44,7 @@ static CHAR portname_file[] = "FILE:"; ...@@ -44,7 +44,7 @@ static CHAR portname_file[] = "FILE:";
static CHAR portname_lpt1[] = "LPT1:"; static CHAR portname_lpt1[] = "LPT1:";
static CHAR server_does_not_exist[] = "\\does_not_exist"; static CHAR server_does_not_exist[] = "\\does_not_exist";
static CHAR version_dll[] = "version.dll"; static CHAR version_dll[] = "version.dll";
static CHAR winetest_monitor[] = "winetest"; static CHAR winetest[] = "winetest";
static HANDLE hwinspool; static HANDLE hwinspool;
static FARPROC pGetDefaultPrinterA; static FARPROC pGetDefaultPrinterA;
...@@ -156,11 +156,11 @@ static struct monitor_entry * find_installed_monitor(void) ...@@ -156,11 +156,11 @@ static struct monitor_entry * find_installed_monitor(void)
num_tests = (sizeof(monitor_table)/sizeof(struct monitor_entry)); num_tests = (sizeof(monitor_table)/sizeof(struct monitor_entry));
/* cleanup */ /* cleanup */
DeleteMonitorA(NULL, env_x86, winetest_monitor); DeleteMonitorA(NULL, env_x86, winetest);
DeleteMonitorA(NULL, env_win9x_case, winetest_monitor); DeleteMonitorA(NULL, env_win9x_case, winetest);
/* find a usable monitor from the table */ /* find a usable monitor from the table */
mi2a.pName = winetest_monitor; mi2a.pName = winetest;
while ((entry == NULL) && (i < num_tests)) { while ((entry == NULL) && (i < num_tests)) {
entry = &monitor_table[i]; entry = &monitor_table[i];
i++; i++;
...@@ -170,7 +170,7 @@ static struct monitor_entry * find_installed_monitor(void) ...@@ -170,7 +170,7 @@ static struct monitor_entry * find_installed_monitor(void)
if (AddMonitorA(NULL, 2, (LPBYTE) &mi2a)) { if (AddMonitorA(NULL, 2, (LPBYTE) &mi2a)) {
/* we got one */ /* we got one */
trace("using '%s', '%s'\n", entry->env, entry->dllname); trace("using '%s', '%s'\n", entry->env, entry->dllname);
DeleteMonitorA(NULL, entry->env, winetest_monitor); DeleteMonitorA(NULL, entry->env, winetest);
} }
else else
{ {
...@@ -286,7 +286,7 @@ static void test_AddMonitor(void) ...@@ -286,7 +286,7 @@ static void test_AddMonitor(void)
"ERROR_PRIVILEGE_NOT_HELD)\n", "ERROR_PRIVILEGE_NOT_HELD)\n",
res, GetLastError()); res, GetLastError());
mi2a.pName = winetest_monitor; mi2a.pName = winetest;
SetLastError(MAGIC_DEAD); SetLastError(MAGIC_DEAD);
res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a); res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a);
/* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_PRIVILEGE_NOT_HELD */ /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_PRIVILEGE_NOT_HELD */
...@@ -323,7 +323,7 @@ static void test_AddMonitor(void) ...@@ -323,7 +323,7 @@ static void test_AddMonitor(void)
(GetLastError() == ERROR_INVALID_PARAMETER)), (GetLastError() == ERROR_INVALID_PARAMETER)),
"returned %d with %d (expected '0' with: ERROR_PROC_NOT_FOUND or " "returned %d with %d (expected '0' with: ERROR_PROC_NOT_FOUND or "
"ERROR_INVALID_PARAMETER)\n", res, GetLastError()); "ERROR_INVALID_PARAMETER)\n", res, GetLastError());
if (res) DeleteMonitorA(NULL, entry->env, winetest_monitor); if (res) DeleteMonitorA(NULL, entry->env, winetest);
/* Test AddMonitor with real options */ /* Test AddMonitor with real options */
mi2a.pDLLName = entry->dllname; mi2a.pDLLName = entry->dllname;
...@@ -342,13 +342,13 @@ static void test_AddMonitor(void) ...@@ -342,13 +342,13 @@ static void test_AddMonitor(void)
"ERROR_PRINT_MONITOR_ALREADY_INSTALLED or ERROR_ALREADY_EXISTS)\n", "ERROR_PRINT_MONITOR_ALREADY_INSTALLED or ERROR_ALREADY_EXISTS)\n",
res, GetLastError()); res, GetLastError());
DeleteMonitorA(NULL, entry->env, winetest_monitor); DeleteMonitorA(NULL, entry->env, winetest);
SetLastError(MAGIC_DEAD); SetLastError(MAGIC_DEAD);
res = AddMonitorA(empty, 2, (LPBYTE) &mi2a); res = AddMonitorA(empty, 2, (LPBYTE) &mi2a);
ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError()); ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError());
/* cleanup */ /* cleanup */
DeleteMonitorA(NULL, entry->env, winetest_monitor); DeleteMonitorA(NULL, entry->env, winetest);
} }
...@@ -472,7 +472,7 @@ static void test_DeleteMonitor(void) ...@@ -472,7 +472,7 @@ static void test_DeleteMonitor(void)
return; return;
} }
mi2a.pName = winetest_monitor; mi2a.pName = winetest;
mi2a.pEnvironment = entry->env; mi2a.pEnvironment = entry->env;
mi2a.pDLLName = entry->dllname; mi2a.pDLLName = entry->dllname;
...@@ -480,12 +480,12 @@ static void test_DeleteMonitor(void) ...@@ -480,12 +480,12 @@ static void test_DeleteMonitor(void)
AddMonitorA(NULL, 2, (LPBYTE) &mi2a); AddMonitorA(NULL, 2, (LPBYTE) &mi2a);
SetLastError(MAGIC_DEAD); SetLastError(MAGIC_DEAD);
res = DeleteMonitorA(NULL, entry->env, winetest_monitor); res = DeleteMonitorA(NULL, entry->env, winetest);
ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError()); ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError());
/* Delete the Monitor twice */ /* Delete the Monitor twice */
SetLastError(MAGIC_DEAD); SetLastError(MAGIC_DEAD);
res = DeleteMonitorA(NULL, entry->env, winetest_monitor); res = DeleteMonitorA(NULL, entry->env, winetest);
/* NT: ERROR_UNKNOWN_PRINT_MONITOR (3000), 9x: ERROR_INVALID_PARAMETER (87) */ /* NT: ERROR_UNKNOWN_PRINT_MONITOR (3000), 9x: ERROR_INVALID_PARAMETER (87) */
ok( !res && ok( !res &&
((GetLastError() == ERROR_UNKNOWN_PRINT_MONITOR) || ((GetLastError() == ERROR_UNKNOWN_PRINT_MONITOR) ||
...@@ -496,17 +496,17 @@ static void test_DeleteMonitor(void) ...@@ -496,17 +496,17 @@ static void test_DeleteMonitor(void)
/* the environment */ /* the environment */
AddMonitorA(NULL, 2, (LPBYTE) &mi2a); AddMonitorA(NULL, 2, (LPBYTE) &mi2a);
SetLastError(MAGIC_DEAD); SetLastError(MAGIC_DEAD);
res = DeleteMonitorA(NULL, NULL, winetest_monitor); res = DeleteMonitorA(NULL, NULL, winetest);
ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError()); ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError());
AddMonitorA(NULL, 2, (LPBYTE) &mi2a); AddMonitorA(NULL, 2, (LPBYTE) &mi2a);
SetLastError(MAGIC_DEAD); SetLastError(MAGIC_DEAD);
res = DeleteMonitorA(NULL, empty, winetest_monitor); res = DeleteMonitorA(NULL, empty, winetest);
ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError()); ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError());
AddMonitorA(NULL, 2, (LPBYTE) &mi2a); AddMonitorA(NULL, 2, (LPBYTE) &mi2a);
SetLastError(MAGIC_DEAD); SetLastError(MAGIC_DEAD);
res = DeleteMonitorA(NULL, invalid_env, winetest_monitor); res = DeleteMonitorA(NULL, invalid_env, winetest);
ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError()); ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError());
/* the monitor-name */ /* the monitor-name */
...@@ -532,11 +532,11 @@ static void test_DeleteMonitor(void) ...@@ -532,11 +532,11 @@ static void test_DeleteMonitor(void)
AddMonitorA(NULL, 2, (LPBYTE) &mi2a); AddMonitorA(NULL, 2, (LPBYTE) &mi2a);
SetLastError(MAGIC_DEAD); SetLastError(MAGIC_DEAD);
res = DeleteMonitorA(empty, entry->env, winetest_monitor); res = DeleteMonitorA(empty, entry->env, winetest);
ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError()); ok(res, "returned %d with %d (expected '!=0')\n", res, GetLastError());
/* cleanup */ /* cleanup */
DeleteMonitorA(NULL, entry->env, winetest_monitor); DeleteMonitorA(NULL, entry->env, winetest);
} }
/* ########################### */ /* ########################### */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment