Commit 5f98620c authored by Austin Lund's avatar Austin Lund Committed by Alexandre Julliard

comdlg32/tests: Fixed up handling of temporary file in printdlg tests.

parent 82a232d1
......@@ -320,18 +320,14 @@ static void test_abort_proc(void)
if (!PrintDlgA(&pd))
{
skip("No default printer available.\n");
ok(DeleteFileA(filename), "Failed to delete temporary file\n");
return;
goto end;
}
GlobalFree(pd.hDevMode);
GlobalFree(pd.hDevNames);
ok(pd.hDC != NULL, "PrintDlg didn't return a DC.\n");
if (!(print_dc = pd.hDC))
{
ok(DeleteFileA(filename), "Failed to delete temporary file\n");
return;
}
goto end;
ok(SetAbortProc(print_dc, abort_proc) > 0, "SetAbortProc failed\n");
ok(!abort_proc_called, "AbortProc got called unexpectedly by SetAbortProc.\n");
......@@ -371,7 +367,9 @@ static void test_abort_proc(void)
abort_proc_called = FALSE;
end:
ok(DeleteFileA(filename), "Failed to delete temporary file\n");
SetLastError(0xdeadbeef);
if(!DeleteFileA(filename))
trace("Failed to delete temporary file (err = %x)\n", 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