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
01ab25e4
Commit
01ab25e4
authored
Nov 15, 2006
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Nov 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl/tests: Add test for ConfigurePortW.
parent
b8a2e3b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletion
+46
-1
localmon.c
dlls/localspl/tests/localmon.c
+46
-1
No files found.
dlls/localspl/tests/localmon.c
View file @
01ab25e4
...
...
@@ -67,8 +67,51 @@ static WCHAR Monitors_LocalPortW[] = { \
'P'
,
'r'
,
'i'
,
'n'
,
't'
,
'\\'
,
'M'
,
'o'
,
'n'
,
'i'
,
't'
,
'o'
,
'r'
,
's'
,
'\\'
,
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
' '
,
'P'
,
'o'
,
'r'
,
't'
,
0
};
static
WCHAR
portname_com1W
[]
=
{
'C'
,
'O'
,
'M'
,
'1'
,
':'
,
0
};
static
WCHAR
portname_fileW
[]
=
{
'F'
,
'I'
,
'L'
,
'E'
,
':'
,
0
};
static
WCHAR
portname_lpt1W
[]
=
{
'L'
,
'P'
,
'T'
,
'1'
,
':'
,
0
};
/* ########################### */
/* ##### */
static
void
test_ConfigurePort
(
void
)
{
DWORD
res
;
if
(
!
pConfigurePort
)
return
;
#if 0
/* NT4 crash on this test */
res = pConfigurePort(NULL, 0, NULL);
#endif
/* Testing-Results (localmon.dll from NT4.0):
- Case of Portname is ignored
- "COM1:" and "COM01:" are the same (Compared by value)
- Portname without ":" => Dialog "Nothing to configure" comes up; Success
- "LPT1:", "LPT0:" and "LPT:" are the same (Numbers in "LPT:" are ignored)
- Empty Servername (LPT1:) => Dialog comes up (Servername is ignored)
- "FILE:" => Dialog "Nothing to configure" comes up; Success
- Empty Portname => => Dialog "Nothing to configure" comes up; Success
- Port "does_not_exist" => Dialog "Nothing to configure" comes up; Success
*/
if
(
winetest_interactive
>
0
)
{
SetLastError
(
0xdeadbeef
);
res
=
pConfigurePort
(
NULL
,
0
,
portname_com1W
);
trace
(
"returned %d with %d
\n
"
,
res
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
res
=
pConfigurePort
(
NULL
,
0
,
portname_lpt1W
);
trace
(
"returned %d with %d
\n
"
,
res
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
res
=
pConfigurePort
(
NULL
,
0
,
portname_fileW
);
trace
(
"returned %d with %d
\n
"
,
res
,
GetLastError
());
}
}
/* ########################### */
static
void
test_EnumPorts
(
void
)
{
...
...
@@ -241,5 +284,7 @@ START_TEST(localmon)
GET_MONITOR_FUNC
(
XcvClosePort
);
}
test_InitializePrintMonitor
();
test_ConfigurePort
();
test_EnumPorts
();
}
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