Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8fcd1107
Commit
8fcd1107
authored
Nov 23, 2006
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Nov 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl/tests: Add test for DeletePort.
parent
ca199009
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
localmon.c
dlls/localspl/tests/localmon.c
+35
-0
No files found.
dlls/localspl/tests/localmon.c
View file @
8fcd1107
...
@@ -58,6 +58,7 @@ static BOOL (WINAPI *pXcvOpenPort)(HANDLE, LPCWSTR, ACCESS_MASK, PHANDLE phXcv)
...
@@ -58,6 +58,7 @@ static BOOL (WINAPI *pXcvOpenPort)(HANDLE, LPCWSTR, ACCESS_MASK, PHANDLE phXcv)
static
DWORD
(
WINAPI
*
pXcvDataPort
)(
HANDLE
,
LPCWSTR
,
PBYTE
,
DWORD
,
PBYTE
,
DWORD
,
PDWORD
);
static
DWORD
(
WINAPI
*
pXcvDataPort
)(
HANDLE
,
LPCWSTR
,
PBYTE
,
DWORD
,
PBYTE
,
DWORD
,
PDWORD
);
static
BOOL
(
WINAPI
*
pXcvClosePort
)(
HANDLE
);
static
BOOL
(
WINAPI
*
pXcvClosePort
)(
HANDLE
);
static
WCHAR
does_not_existW
[]
=
{
'd'
,
'o'
,
'e'
,
's'
,
'_'
,
'n'
,
'o'
,
't'
,
'_'
,
'e'
,
'x'
,
'i'
,
's'
,
't'
,
0
};
static
WCHAR
emptyW
[]
=
{
0
};
static
WCHAR
emptyW
[]
=
{
0
};
static
WCHAR
invalid_serverW
[]
=
{
'\\'
,
'\\'
,
'i'
,
'n'
,
'v'
,
'a'
,
'l'
,
'i'
,
'd'
,
'_'
,
's'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
static
WCHAR
invalid_serverW
[]
=
{
'\\'
,
'\\'
,
'i'
,
'n'
,
'v'
,
'a'
,
'l'
,
'i'
,
'd'
,
'_'
,
's'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
static
WCHAR
Monitors_LocalPortW
[]
=
{
\
static
WCHAR
Monitors_LocalPortW
[]
=
{
\
...
@@ -78,6 +79,7 @@ static void test_ConfigurePort(void)
...
@@ -78,6 +79,7 @@ static void test_ConfigurePort(void)
{
{
DWORD
res
;
DWORD
res
;
/* moved to localui.dll since w2k */
if
(
!
pConfigurePort
)
return
;
if
(
!
pConfigurePort
)
return
;
#if 0
#if 0
...
@@ -113,6 +115,38 @@ static void test_ConfigurePort(void)
...
@@ -113,6 +115,38 @@ static void test_ConfigurePort(void)
/* ########################### */
/* ########################### */
static
void
test_DeletePort
(
void
)
{
DWORD
res
;
/* moved to localui.dll since w2k */
if
(
!
pDeletePort
)
return
;
#if 0
/* NT4 crash on this test */
res = pDeletePort(NULL, 0, NULL);
#endif
/* Testing-Results (localmon.dll from NT4.0):
- Case of Portname is ignored (returned '1' on Success)
- "COM1:" and "COM01:" are different (Compared as string)
- server_does_not_exist (LPT1:) => Port deleted, Success (Servername is ignored)
- Empty Portname => => FALSE (LastError not changed)
- Port "does_not_exist" => FALSE (LastError not changed)
*/
SetLastError
(
0xdeadbeef
);
res
=
pDeletePort
(
NULL
,
0
,
emptyW
);
ok
(
!
res
,
"returned %d with 0x%x (expected '0')
\n
"
,
res
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
res
=
pDeletePort
(
NULL
,
0
,
does_not_existW
);
ok
(
!
res
,
"returned %d with 0x%x (expected '0')
\n
"
,
res
,
GetLastError
());
}
/* ########################### */
static
void
test_EnumPorts
(
void
)
static
void
test_EnumPorts
(
void
)
{
{
DWORD
res
;
DWORD
res
;
...
@@ -286,5 +320,6 @@ START_TEST(localmon)
...
@@ -286,5 +320,6 @@ START_TEST(localmon)
test_InitializePrintMonitor
();
test_InitializePrintMonitor
();
test_ConfigurePort
();
test_ConfigurePort
();
test_DeletePort
();
test_EnumPorts
();
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