James Hawkins : advpack: Run the install test in a temporary directory.
Alexandre Julliard
julliard at winehq.org
Mon Jun 30 08:27:33 CDT 2008
Module: wine
Branch: master
Commit: 8cfb50e57e312106bafcb68c50c3bb896e4ff9bc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8cfb50e57e312106bafcb68c50c3bb896e4ff9bc
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Sun Jun 29 18:17:44 2008 -0500
advpack: Run the install test in a temporary directory.
---
dlls/advpack/tests/install.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c
index 564ecda..9423dd0 100644
--- a/dlls/advpack/tests/install.c
+++ b/dlls/advpack/tests/install.c
@@ -266,14 +266,26 @@ static void test_LaunchINFSectionEx(void)
START_TEST(install)
{
+ DWORD len;
+ char temp_path[MAX_PATH], prev_path[MAX_PATH];
+
if (!init_function_pointers())
return;
- GetCurrentDirectoryA(MAX_PATH, CURR_DIR);
+ GetCurrentDirectoryA(MAX_PATH, prev_path);
+ GetTempPath(MAX_PATH, temp_path);
+ SetCurrentDirectoryA(temp_path);
+
+ lstrcpyA(CURR_DIR, temp_path);
+ len = lstrlenA(CURR_DIR);
+
+ if(len && (CURR_DIR[len - 1] == '\\'))
+ CURR_DIR[len - 1] = 0;
test_RunSetupCommand();
test_LaunchINFSection();
test_LaunchINFSectionEx();
FreeLibrary(hAdvPack);
+ SetCurrentDirectoryA(prev_path);
}
More information about the wine-cvs
mailing list