Paul Vriens : advpack/tests: Don't hardcode the windows directory.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Apr 12 10:00:00 CDT 2007
Module: wine
Branch: master
Commit: c7e40aa97259346fa673b4fec34a381c0bb06038
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c7e40aa97259346fa673b4fec34a381c0bb06038
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Thu Apr 12 10:57:43 2007 +0200
advpack/tests: Don't hardcode the windows directory.
---
dlls/advpack/tests/files.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/advpack/tests/files.c b/dlls/advpack/tests/files.c
index 89f8ba9..cbbbd3a 100644
--- a/dlls/advpack/tests/files.c
+++ b/dlls/advpack/tests/files.c
@@ -131,6 +131,7 @@ static void test_AddDelBackupEntry(void)
{
HRESULT res;
CHAR path[MAX_PATH];
+ CHAR windir[MAX_PATH];
lstrcpyA(path, CURR_DIR);
lstrcatA(path, "\\backup\\basename.INI");
@@ -187,9 +188,10 @@ static void test_AddDelBackupEntry(void)
ok(DeleteFileA(path), "Expected path to exist\n");
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);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n");
More information about the wine-cvs
mailing list