CreateDirectoryA conformance test improvement
Wolfgang Schwotzer
wolfgang.schwotzer at gmx.net
Wed Sep 8 14:14:19 CDT 2004
This patch provides a conformance test for my patch
sent on 06. Sept 2004.
I have successfully tested it on Windows98 and WindowsNT4.
-------------- next part --------------
Index: dlls/kernel/tests/path.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/tests/path.c,v
retrieving revision 1.26
diff -u -u -r1.26 path.c
--- dlls/kernel/tests/path.c 2 Jun 2004 00:36:36 -0000 1.26
+++ dlls/kernel/tests/path.c 8 Sep 2004 19:06:58 -0000
@@ -302,6 +302,7 @@
tmpstr[MAX_PATH],
tmpstr1[MAX_PATH];
DWORD len,len1,drives;
+ DWORD error;
INT id;
HANDLE hndl;
@@ -361,6 +362,15 @@
ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n");
sprintf(tmpstr,"%s\\%s",newdir,LONGDIR);
ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n");
+ sprintf(tmpstr,"%c:",newdir[0]);
+ SetLastError(0);
+ if (!CreateDirectoryA(tmpstr,NULL)) {
+ error = GetLastError();
+ ok(error == ERROR_ALREADY_EXISTS,
+ "CreateDirectoryA wrong error, tmpstr=%s, error=%ld, (expected=%d)\n",
+ tmpstr, error, ERROR_ALREADY_EXISTS);
+ } else ok(0, "CreateDirectoryA failed\n");
+
sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,SHORTFILE);
hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL,
CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL);
More information about the wine-patches
mailing list