Commit 3cd41500 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/tests: Don't hardcode C drive for CreateDirectory tests.

parent 1a28fb6c
......@@ -384,14 +384,16 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n");
sprintf(tmpstr,"%s\\%s",newdir,LONGDIR);
ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n");
bRes = CreateDirectoryA("c:",NULL);
ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED ||
sprintf(tmpstr,"%c:", *curDrive);
bRes = CreateDirectoryA(tmpstr,NULL);
ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED ||
GetLastError() == ERROR_ALREADY_EXISTS),
"CreateDirectoryA(\"c:\" should have failed (%d)\n", GetLastError());
bRes = CreateDirectoryA("c:\\",NULL);
"CreateDirectoryA(\"%s\" should have failed (%d)\n", tmpstr, GetLastError());
sprintf(tmpstr,"%c:\\", *curDrive);
bRes = CreateDirectoryA(tmpstr,NULL);
ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED ||
GetLastError() == ERROR_ALREADY_EXISTS),
"CreateDirectoryA(\"c:\\\" should have failed (%d)\n", GetLastError());
"CreateDirectoryA(\"%s\" should have failed (%d)\n", tmpstr, GetLastError());
sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,SHORTFILE);
hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL,
CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment