Commit c7e40aa9 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

advpack/tests: Don't hardcode the windows directory.

parent 09a2c89a
...@@ -131,6 +131,7 @@ static void test_AddDelBackupEntry(void) ...@@ -131,6 +131,7 @@ static void test_AddDelBackupEntry(void)
{ {
HRESULT res; HRESULT res;
CHAR path[MAX_PATH]; CHAR path[MAX_PATH];
CHAR windir[MAX_PATH];
lstrcpyA(path, CURR_DIR); lstrcpyA(path, CURR_DIR);
lstrcatA(path, "\\backup\\basename.INI"); lstrcatA(path, "\\backup\\basename.INI");
...@@ -187,9 +188,10 @@ static void test_AddDelBackupEntry(void) ...@@ -187,9 +188,10 @@ static void test_AddDelBackupEntry(void)
ok(DeleteFileA(path), "Expected path to exist\n"); ok(DeleteFileA(path), "Expected path to exist\n");
RemoveDirectoryA("backup"); RemoveDirectoryA("backup");
lstrcpyA(path, "c:\\windows\\basename.INI"); GetWindowsDirectoryA(windir, sizeof(windir));
sprintf(path, "%s\\basename.INI", windir);
/* try a NULL backup dir, INI is created in c:\windows */ /* try a NULL backup dir, INI is created in the windows directory */
res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", AADBE_ADD_ENTRY); res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %d\n", res); ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n"); ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n");
......
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