Commit 5d38ddc2 authored by Ge van Geldorp's avatar Ge van Geldorp Committed by Alexandre Julliard

comdlg32/tests: Fix test on Win7.

parent ae516dba
......@@ -634,9 +634,11 @@ static void test_ok(void)
OPENFILENAME ofn = { sizeof(OPENFILENAME)};
char filename[1024] = {0};
char tmpfilename[ MAX_PATH];
char curdir[MAX_PATH];
int i;
DWORD ret;
ok(GetCurrentDirectoryA(sizeof(curdir), curdir) != 0, "Failed to get current dir err %d\n", GetLastError());
if (!GetTempFileNameA(".", "txt", 0, tmpfilename)) {
skip("Failed to create a temporary file name\n");
return;
......@@ -659,6 +661,7 @@ static void test_ok(void)
ok(ret == ok_testcases[i].expclose, "testid %d: GetOpenFileName returned %#x\n", i, ret);
ret = CommDlgExtendedError();
ok(!ret, "CommDlgExtendedError returned %#x\n", ret);
ok(SetCurrentDirectoryA(curdir), "Failed to restore current dir err %d\n", GetLastError());
}
ret = DeleteFileA( tmpfilename);
ok( ret, "Failed to delete temporary file %s err %d\n", tmpfilename, GetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment