kernel[1/2]: properly delete a test file

Andrew Ziem ahziem1 at mailbolt.com
Mon May 15 09:25:46 CDT 2006


Changelog: properly delete a test file
-------------- next part --------------
Index: dlls/kernel/tests/path.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/tests/path.c,v
retrieving revision 1.32
diff -u -r1.32 path.c
--- dlls/kernel/tests/path.c	12 Nov 2005 19:09:06 -0000	1.32
+++ dlls/kernel/tests/path.c	15 May 2006 05:32:18 -0000
@@ -337,6 +337,7 @@
      lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr1)==0,
      "GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
      newdir,tmpstr,tmpstr1,id);
+  ok(DeleteFileA(newdir),"Couldn't delete the temporary file we just created\n");     
 
   ok((id=GetTempFileNameA(tmppath,NULL,0,newdir)),"GetTempFileNameA failed\n");
   sprintf(tmpstr,"%.4x.tmp",id & 0xffff);
@@ -345,7 +346,7 @@
      lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr1)==0,
      "GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
      newdir,tmpstr,tmpstr1,id);
-
+  ok(DeleteFileA(newdir),"Couldn't delete the temporary file we just created\n");
 
 /* Find first valid drive letter that is neither newdir[0] nor curDrive */
   drives = GetLogicalDrives() & ~(1<<(newdir[0]-'A'));
@@ -361,6 +362,7 @@
    really understand how they work.
    More formal tests should be done along with CreateFile tests
 */
+  ok((id=GetTempFileNameA(tmppath,"path",0,newdir)),"GetTempFileNameA failed\n");
   ok(CreateDirectoryA(newdir,NULL)==0,
      "CreateDirectoryA succeeded even though a file of the same name exists\n");
   ok(DeleteFileA(newdir),"Couldn't delete the temporary file we just created\n");


More information about the wine-patches mailing list