How to add test to msvcrt directory

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sat Sep 7 13:30:53 CDT 2002


Hallo,

I have appended the framework to create a tests directory in
dll/msvcrt. However after

autoconf
./configure
make depend
cd dlls/msvcrt
make test

a lot of conflicts show up between the system native headers and wine's
msvcrt headers. Perhaps somebody can resolve them and add it to the wine
tree.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.75
diff -u -r1.75 configure.ac
--- wine/configure.ac	6 Sep 2002 19:46:01 -0000	1.75
+++ wine/configure.ac	7 Sep 2002 18:14:15 -0000
@@ -1406,6 +1406,7 @@
 dlls/msnet32/Makefile
 dlls/msrle32/Makefile
 dlls/msvcrt/Makefile
+dlls/msvcrt/tests/Makefile
 dlls/msvcrt20/Makefile
 dlls/msvideo/Makefile
 dlls/netapi32/Makefile
Index: wine/dlls/msvcrt/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/Makefile.in,v
retrieving revision 1.9
diff -u -r1.9 Makefile.in
--- wine/dlls/msvcrt/Makefile.in	17 Aug 2002 01:22:00 -0000	1.9
+++ wine/dlls/msvcrt/Makefile.in	7 Sep 2002 18:14:15 -0000
@@ -37,6 +37,8 @@
 	time.c \
 	wcs.c
 
+SUBDIRS      = tests
+
 @MAKE_DLL_RULES@
 
 ### Dependencies:
diff -ur --new-file NULL/Makefile.in wine/dlls/msvcrt/tests/Makefile.in
--- NULL/Makefile.in	Thu Jan  1 01:00:00 1970
+++ wine/dlls/msvcrt/tests/Makefile.in	Sat Sep  7 18:52:48 2002
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+TESTDLL   = msvcrt.dll
+IMPORTS   = msvcrt
+
+CTESTS = \
+	scan.c 
+
+ at MAKE_TEST_RULES@
+
+### Dependencies:
diff -ur --new-file NULL/scan.c wine/dlls/msvcrt/tests/scan.c
--- NULL/scan.c	Thu Jan  1 01:00:00 1970
+++ wine/dlls/msvcrt/tests/scan.c	Sat Sep  7 19:47:15 2002
@@ -0,0 +1,51 @@
+/*
+ * Unit test suite for *scanf functions.
+ *
+ * Copyright 2002 Uwe Bonnes
+ *
+ * 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 "msvcrt/stdio.h"
+#include "wine/test.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winerror.h"
+
+static void test__sscanf( void )
+{
+#define HEXNUM1 "0x519"
+#define HEXNUM2 "0x51a"
+#define HEXNUM3 "0x51g"
+
+    char buffer[4095];
+    int result;
+
+    strcpy(buffer,HEXNUM1);
+    ok(1 != sscanf(buffer, "%x", &result), "sscanf failed" );
+    //    ok(HEXNUM1 != result,"sscanf reads %x instead of %s", result, HEXNUM1);
+    strcpy(buffer,HEXNUM2);
+    ok(1 != sscanf(buffer, "%x", &result), "sscanf failed" );
+    //    ok(HEXNUM2 != result,"sscanf reads %x instead of %s", result, HEXNUM2);
+    strcpy(buffer,HEXNUM3);
+    ok(1 != sscanf(buffer, "%x", &result), "sscanf failed" );
+    //    ok(HEXNUM3 != result,"sscanf reads %x instead of %s", result, HEXNUM3);
+}
+    
+
+
+START_TEST(file)
+{
+    test__sscanf(  );
+}



More information about the wine-devel mailing list