Module: wine Branch: master Commit: d155df5c19bc5b4f8254b7d6f7e46e3f38ec472f URL: http://source.winehq.org/git/wine.git/?a=commit;h=d155df5c19bc5b4f8254b7d6f7...
Author: Francois Gouget fgouget@codeweavers.com Date: Mon Feb 24 23:56:50 2014 +0100
winmm/tests: Change the current directory to a place that will be writable.
---
dlls/winmm/tests/mci.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index 6a68b41..c162fce 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -1297,8 +1297,14 @@ static void test_AutoOpenWAVE(HWND hwnd)
START_TEST(mci) { + char curdir[MAX_PATH], tmpdir[MAX_PATH]; MCIERROR err; HWND hwnd; + + GetCurrentDirectoryA(MAX_PATH, curdir); + GetTempPathA(MAX_PATH, tmpdir); + SetCurrentDirectoryA(tmpdir); + hwnd = CreateWindowExA(0, "static", "winmm test", WS_POPUP, 0,0,100,100, 0, 0, 0, NULL); test_mciParser(hwnd); @@ -1315,4 +1321,6 @@ START_TEST(mci) ok(!err,"final close all returned %s\n", dbg_mcierr(err)); ok(DeleteFileA("tempfile.wav") || ok_saved, "Delete tempfile.wav (cause auto-open?)\n"); DestroyWindow(hwnd); + + SetCurrentDirectoryA(curdir); }