kernel: Fix path test to pass on 95 and 98.

This commit is contained in:
Andrew Ziem 2006-05-16 21:40:46 -06:00 committed by Alexandre Julliard
parent 21196a084a
commit 8bed7bb61a
1 changed files with 12 additions and 8 deletions

View File

@ -339,7 +339,10 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
newdir,tmpstr,tmpstr1,id); newdir,tmpstr,tmpstr1,id);
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");
ok((id=GetTempFileNameA(tmppath,NULL,0,newdir)),"GetTempFileNameA failed\n"); id=GetTempFileNameA(tmppath,NULL,0,newdir);
/* Windows 95, 98 return 0==id, while Windows 2000, XP return 0!=id */
if (id)
{
sprintf(tmpstr,"%.4x.tmp",id & 0xffff); sprintf(tmpstr,"%.4x.tmp",id & 0xffff);
sprintf(tmpstr1,"%x.tmp",id & 0xffff); sprintf(tmpstr1,"%x.tmp",id & 0xffff);
ok(lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr)==0 || ok(lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr)==0 ||
@ -347,6 +350,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
"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(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'));