James Hawkins : msi: Run the install tests from a temporary directory.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 19 10:04:53 CST 2006


Module: wine
Branch: master
Commit: e1f76deedca0a331a86ced46089e7eab6d5237ff
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e1f76deedca0a331a86ced46089e7eab6d5237ff

Author: James Hawkins <truiken at gmail.com>
Date:   Mon Dec 18 04:36:00 2006 -0600

msi: Run the install tests from a temporary directory.

---

 dlls/msi/tests/install.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 3541ab2..adc15bf 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -973,18 +973,25 @@ static void test_caborder(void)
 START_TEST(install)
 {
     DWORD len;
+    char temp_path[MAX_PATH], prev_path[MAX_PATH];
 
-    get_program_files_dir(PROG_FILES_DIR);
+    GetCurrentDirectoryA(MAX_PATH, prev_path);
+    GetTempPath(MAX_PATH, temp_path);
+    SetCurrentDirectoryA(temp_path);
 
-    GetCurrentDirectoryA(MAX_PATH, CURR_DIR);
+    lstrcpyA(CURR_DIR, temp_path);
     len = lstrlenA(CURR_DIR);
 
-    if(len && (CURR_DIR[len-1] == '\\'))
+    if(len && (CURR_DIR[len - 1] == '\\'))
         CURR_DIR[len - 1] = 0;
 
+    get_program_files_dir(PROG_FILES_DIR);
+
     test_MsiInstallProduct();
     test_MsiSetComponentState();
     test_packagecoltypes();
     test_continuouscabs();
     test_caborder();
+
+    SetCurrentDirectoryA(prev_path);
 }




More information about the wine-cvs mailing list