Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f9402b87
Commit
f9402b87
authored
Jan 15, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jan 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool/tests: Use a more generic name for a variable.
parent
e6b1bd5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
info.c
dlls/winspool.drv/tests/info.c
+18
-18
No files found.
dlls/winspool.drv/tests/info.c
View file @
f9402b87
...
...
@@ -44,7 +44,7 @@ static CHAR portname_file[] = "FILE:";
static
CHAR
portname_lpt1
[]
=
"LPT1:"
;
static
CHAR
server_does_not_exist
[]
=
"
\\
does_not_exist"
;
static
CHAR
version_dll
[]
=
"version.dll"
;
static
CHAR
winetest
_monitor
[]
=
"winetest"
;
static
CHAR
winetest
[]
=
"winetest"
;
static
HANDLE
hwinspool
;
static
FARPROC
pGetDefaultPrinterA
;
...
...
@@ -156,11 +156,11 @@ static struct monitor_entry * find_installed_monitor(void)
num_tests
=
(
sizeof
(
monitor_table
)
/
sizeof
(
struct
monitor_entry
));
/* cleanup */
DeleteMonitorA
(
NULL
,
env_x86
,
winetest
_monitor
);
DeleteMonitorA
(
NULL
,
env_win9x_case
,
winetest
_monitor
);
DeleteMonitorA
(
NULL
,
env_x86
,
winetest
);
DeleteMonitorA
(
NULL
,
env_win9x_case
,
winetest
);
/* find a usable monitor from the table */
mi2a
.
pName
=
winetest
_monitor
;
/* find a usable monitor from the table */
mi2a
.
pName
=
winetest
;
while
((
entry
==
NULL
)
&&
(
i
<
num_tests
))
{
entry
=
&
monitor_table
[
i
];
i
++
;
...
...
@@ -170,7 +170,7 @@ static struct monitor_entry * find_installed_monitor(void)
if
(
AddMonitorA
(
NULL
,
2
,
(
LPBYTE
)
&
mi2a
))
{
/* we got one */
trace
(
"using '%s', '%s'
\n
"
,
entry
->
env
,
entry
->
dllname
);
DeleteMonitorA
(
NULL
,
entry
->
env
,
winetest
_monitor
);
DeleteMonitorA
(
NULL
,
entry
->
env
,
winetest
);
}
else
{
...
...
@@ -286,7 +286,7 @@ static void test_AddMonitor(void)
"ERROR_PRIVILEGE_NOT_HELD)
\n
"
,
res
,
GetLastError
());
mi2a
.
pName
=
winetest
_monitor
;
mi2a
.
pName
=
winetest
;
SetLastError
(
MAGIC_DEAD
);
res
=
AddMonitorA
(
NULL
,
2
,
(
LPBYTE
)
&
mi2a
);
/* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_PRIVILEGE_NOT_HELD */
...
...
@@ -323,7 +323,7 @@ static void test_AddMonitor(void)
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
)),
"returned %d with %d (expected '0' with: ERROR_PROC_NOT_FOUND or "
"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 */
mi2a
.
pDLLName
=
entry
->
dllname
;
...
...
@@ -342,13 +342,13 @@ static void test_AddMonitor(void)
"ERROR_PRINT_MONITOR_ALREADY_INSTALLED or ERROR_ALREADY_EXISTS)
\n
"
,
res
,
GetLastError
());
DeleteMonitorA
(
NULL
,
entry
->
env
,
winetest
_monitor
);
DeleteMonitorA
(
NULL
,
entry
->
env
,
winetest
);
SetLastError
(
MAGIC_DEAD
);
res
=
AddMonitorA
(
empty
,
2
,
(
LPBYTE
)
&
mi2a
);
ok
(
res
,
"returned %d with %d (expected '!= 0')
\n
"
,
res
,
GetLastError
());
/* cleanup */
DeleteMonitorA
(
NULL
,
entry
->
env
,
winetest
_monitor
);
DeleteMonitorA
(
NULL
,
entry
->
env
,
winetest
);
}
...
...
@@ -472,7 +472,7 @@ static void test_DeleteMonitor(void)
return
;
}
mi2a
.
pName
=
winetest
_monitor
;
mi2a
.
pName
=
winetest
;
mi2a
.
pEnvironment
=
entry
->
env
;
mi2a
.
pDLLName
=
entry
->
dllname
;
...
...
@@ -480,12 +480,12 @@ static void test_DeleteMonitor(void)
AddMonitorA
(
NULL
,
2
,
(
LPBYTE
)
&
mi2a
);
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
());
/* Delete the Monitor twice */
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) */
ok
(
!
res
&&
((
GetLastError
()
==
ERROR_UNKNOWN_PRINT_MONITOR
)
||
...
...
@@ -496,17 +496,17 @@ static void test_DeleteMonitor(void)
/* the environment */
AddMonitorA
(
NULL
,
2
,
(
LPBYTE
)
&
mi2a
);
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
());
AddMonitorA
(
NULL
,
2
,
(
LPBYTE
)
&
mi2a
);
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
());
AddMonitorA
(
NULL
,
2
,
(
LPBYTE
)
&
mi2a
);
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
());
/* the monitor-name */
...
...
@@ -532,11 +532,11 @@ static void test_DeleteMonitor(void)
AddMonitorA
(
NULL
,
2
,
(
LPBYTE
)
&
mi2a
);
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
());
/* cleanup */
DeleteMonitorA
(
NULL
,
entry
->
env
,
winetest
_monitor
);
DeleteMonitorA
(
NULL
,
entry
->
env
,
winetest
);
}
/* ########################### */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment