Commit 01ab25e4 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

localspl/tests: Add test for ConfigurePortW.

parent b8a2e3b8
......@@ -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();
}
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