secur32: add first SSPI test to actually see what work needs to be done

Kai Blin blin at gmx.net
Tue Aug 2 19:03:27 CDT 2005


This patch adds tests to secur32. Those are needed to check how the API
is supposed to behave in win32.


ChangeLog:
Kai Blin <blin at gmx.net> 
Add some secur32 tests.

-- 
Kai Blin, (blin at gmx dot net)
Once you've seen one nuclear war, you've seen them all.
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.384
diff -u -3 -r1.384 configure.ac
--- configure.ac	2 Aug 2005 11:29:05 -0000	1.384
+++ configure.ac	2 Aug 2005 23:47:49 -0000
@@ -1698,6 +1698,7 @@
 dlls/rsaenh/Makefile
 dlls/rsaenh/tests/Makefile
 dlls/secur32/Makefile
+dlls/secur32/tests/Makefile
 dlls/sensapi/Makefile
 dlls/serialui/Makefile
 dlls/setupapi/Makefile
Index: dlls/secur32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/secur32/Makefile.in,v
retrieving revision 1.3
diff -u -3 -r1.3 Makefile.in
--- dlls/secur32/Makefile.in	13 May 2005 17:44:47 -0000	1.3
+++ dlls/secur32/Makefile.in	2 Aug 2005 23:48:00 -0000
@@ -12,6 +12,8 @@
 	thunks.c \
 	wrapper.c
 
+SUBDIRS = tests
+
 @MAKE_DLL_RULES@
 
 ### Dependencies:
--- /dev/null	2004-02-19 15:43:50.000000000 +0100
+++ dlls/secur32/tests/main.c	2005-08-03 01:45:27.038552560 +0200
@@ -0,0 +1,50 @@
+/*
+ * Miscellaneous secur32 tests
+ *
+ * Copyright 2005 Kai Blin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <windows.h>
+#include <winsock2.h>
+#include <mswsock.h>
+#include "wine/test.h"
+#include <winbase.h>
+#include <sspi.h>
+
+#define BUFF_SIZE 2048
+
+
+static void testQuerySecurityPackageInfo(void)
+{
+    SECURITY_STATUS     sec_status = 0;
+    SEC_CHAR            *sec_pkg_name = NULL;
+    PSecPkgInfo         pkg_info;
+    
+    lstrcpy(sec_pkg_name, "Negotiate");
+    
+    sec_status = QuerySecurityPackageInfo( sec_pkg_name, &pkg_info);
+
+    ok((long)sec_status >= 0L, "Return value of QuerySecurityPackageInfo should be >= 0, but is %ld\n", (long)sec_status);
+    
+}
+
+START_TEST(main)
+{
+    testQuerySecurityPackageInfo();
+}
--- /dev/null	2004-02-19 15:43:50.000000000 +0100
+++ dlls/secur32/tests/Makefile.in	2005-08-03 01:45:18.516848056 +0200
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+TESTDLL   = secur32.dll
+IMPORTS   = secur32
+
+CTESTS = \
+	main.c
+
+ at MAKE_TEST_RULES@
+
+### Dependencies:


More information about the wine-patches mailing list