Detlef Riekenberg : localspl: Add initial tests for AddPortW.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 28 06:06:17 CST 2006
Module: wine
Branch: master
Commit: 603ecd298da05ca3d4e428327e97f3e366ca5923
URL: http://source.winehq.org/git/wine.git/?a=commit;h=603ecd298da05ca3d4e428327e97f3e366ca5923
Author: Detlef Riekenberg <wine.dev at web.de>
Date: Tue Nov 28 00:45:10 2006 +0100
localspl: Add initial tests for AddPortW.
---
dlls/localspl/tests/localmon.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/dlls/localspl/tests/localmon.c b/dlls/localspl/tests/localmon.c
index ada1a76..55a1a9c 100644
--- a/dlls/localspl/tests/localmon.c
+++ b/dlls/localspl/tests/localmon.c
@@ -74,6 +74,35 @@ static WCHAR portname_fileW[] = {'F','I'
static WCHAR portname_lpt1W[] = {'L','P','T','1',':',0};
/* ########################### */
+
+static void test_AddPort(void)
+{
+ DWORD res;
+
+ /* moved to localui.dll since w2k */
+ if (!pAddPort) return;
+
+#if 0
+ /* NT4 crash on this test */
+ res = pAddPort(NULL, 0, NULL);
+#endif
+
+ /* Testing-Results (localmon.dll from NT4.0):
+ - The Servername is ignored
+ - Case of MonitorName is ignored
+ */
+
+ SetLastError(0xdeadbeef);
+ res = pAddPort(NULL, 0, emptyW);
+ ok(!res, "returned %d with 0x%x (expected '0')\n", res, GetLastError());
+
+ SetLastError(0xdeadbeef);
+ res = pAddPort(NULL, 0, does_not_existW);
+ ok(!res, "returned %d with 0x%x (expected '0')\n", res, GetLastError());
+
+}
+
+/* ########################### */
static void test_ConfigurePort(void)
{
@@ -319,6 +348,7 @@ START_TEST(localmon)
}
test_InitializePrintMonitor();
+ test_AddPort();
test_ConfigurePort();
test_DeletePort();
test_EnumPorts();
More information about the wine-cvs
mailing list