localspl: Add inital tests for AddPortW
Detlef Riekenberg
wine.dev at web.de
Mon Nov 27 17:45:10 CST 2006
Changelog:
localspl: Add inital tests for AddPortW
--
By by ... Detlef
-------------- next part --------------
>From 2b7bcb35bcbd84e59f6afd8a17ac893e88c4485d Mon Sep 17 00:00:00 2001
From: Detlef Riekenberg <wine.dev at web.de>
Date: Tue, 28 Nov 2006 00:12:05 +0100
Subject: [PATCH] localspl/tests: 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();
--
1.4.1
More information about the wine-patches
mailing list