kernel32/tests: Change the current directory to a place that will be writable.

Francois Gouget fgouget at free.fr
Tue Mar 4 06:56:51 CST 2014


---
 dlls/kernel32/tests/profile.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c
index ca3a07e..7eec1c0 100644
--- a/dlls/kernel32/tests/profile.c
+++ b/dlls/kernel32/tests/profile.c
@@ -1121,6 +1121,12 @@ static void test_WritePrivateProfileString(void)
 
 START_TEST(profile)
 {
+    char curdir[MAX_PATH], tmpdir[MAX_PATH];
+
+    GetCurrentDirectoryA(MAX_PATH, curdir);
+    GetTempPathA(MAX_PATH, tmpdir);
+    SetCurrentDirectoryA(tmpdir);
+
     test_profile_int();
     test_profile_string();
     test_profile_sections();
@@ -1145,4 +1151,6 @@ START_TEST(profile)
         "[section2]\r",
         "CR only");
     test_WritePrivateProfileString();
+
+    SetCurrentDirectoryA(curdir);
 }
-- 
1.8.5.3




More information about the wine-patches mailing list