kernel: Properly delete a test file.
This commit is contained in:
parent
5c0dde7798
commit
ac73b30f95
|
@ -337,6 +337,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
|
||||||
lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr1)==0,
|
lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr1)==0,
|
||||||
"GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
|
"GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
|
||||||
newdir,tmpstr,tmpstr1,id);
|
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");
|
ok((id=GetTempFileNameA(tmppath,NULL,0,newdir)),"GetTempFileNameA failed\n");
|
||||||
sprintf(tmpstr,"%.4x.tmp",id & 0xffff);
|
sprintf(tmpstr,"%.4x.tmp",id & 0xffff);
|
||||||
|
@ -345,7 +346,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
|
||||||
lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr1)==0,
|
lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr1)==0,
|
||||||
"GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
|
"GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
|
||||||
newdir,tmpstr,tmpstr1,id);
|
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 */
|
/* Find first valid drive letter that is neither newdir[0] nor curDrive */
|
||||||
drives = GetLogicalDrives() & ~(1<<(newdir[0]-'A'));
|
drives = GetLogicalDrives() & ~(1<<(newdir[0]-'A'));
|
||||||
|
@ -361,6 +362,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
|
||||||
really understand how they work.
|
really understand how they work.
|
||||||
More formal tests should be done along with CreateFile tests
|
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,
|
ok(CreateDirectoryA(newdir,NULL)==0,
|
||||||
"CreateDirectoryA succeeded even though a file of the same name exists\n");
|
"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");
|
ok(DeleteFileA(newdir),"Couldn't delete the temporary file we just created\n");
|
||||||
|
|
Loading…
Reference in New Issue