Commit c525d7ab authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/tests: Use GetTempFileName() instead of hardcoding directory names.

parent 4b85165c
...@@ -118,10 +118,12 @@ static void test_FindFirstChangeNotification(void) ...@@ -118,10 +118,12 @@ static void test_FindFirstChangeNotification(void)
ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindCloseChangeNotification error: %d\n", ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindCloseChangeNotification error: %d\n",
GetLastError()); GetLastError());
ret = GetTempPathA(MAX_PATH, workdir); ret = GetTempPathA(MAX_PATH, dirname1);
ok(ret, "GetTempPathA error: %d\n", GetLastError()); ok(ret, "GetTempPathA error: %d\n", GetLastError());
lstrcatA(workdir, "testFileChangeNotification"); ret = GetTempFileNameA(dirname1, "ffc", 0, workdir);
ok(ret, "GetTempFileNameA error: %d\n", GetLastError());
DeleteFileA( workdir );
ret = CreateDirectoryA(workdir, NULL); ret = CreateDirectoryA(workdir, NULL);
ok(ret, "CreateDirectoryA error: %d\n", GetLastError()); ok(ret, "CreateDirectoryA error: %d\n", GetLastError());
...@@ -370,14 +372,14 @@ static void test_ffcnMultipleThreads(void) ...@@ -370,14 +372,14 @@ static void test_ffcnMultipleThreads(void)
LONG r; LONG r;
DWORD filter, threadId, status, exitcode; DWORD filter, threadId, status, exitcode;
HANDLE handles[2]; HANDLE handles[2];
char path[MAX_PATH]; char tmp[MAX_PATH], path[MAX_PATH];
r = GetTempPathA(MAX_PATH, path); r = GetTempPathA(MAX_PATH, tmp);
ok(r, "GetTempPathA error: %d\n", GetLastError()); ok(r, "GetTempPathA error: %d\n", GetLastError());
lstrcatA(path, "ffcnTestMultipleThreads"); r = GetTempFileNameA(tmp, "ffc", 0, path);
ok(r, "GetTempFileNameA error: %d\n", GetLastError());
RemoveDirectoryA(path); DeleteFileA( path );
r = CreateDirectoryA(path, NULL); r = CreateDirectoryA(path, NULL);
ok(r, "CreateDirectoryA error: %d\n", GetLastError()); ok(r, "CreateDirectoryA error: %d\n", GetLastError());
......
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