Marcus Meissner : comdlg32/tests:
Handle case where no printer is configured.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 20 07:42:43 CDT 2007
Module: wine
Branch: master
Commit: b8a76c60f5d077b25faed581558fdfc5e7a5671a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8a76c60f5d077b25faed581558fdfc5e7a5671a
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Sun Aug 19 11:34:57 2007 +0200
comdlg32/tests: Handle case where no printer is configured.
---
dlls/comdlg32/tests/printdlg.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/comdlg32/tests/printdlg.c b/dlls/comdlg32/tests/printdlg.c
index 4577bb9..7e39dad 100644
--- a/dlls/comdlg32/tests/printdlg.c
+++ b/dlls/comdlg32/tests/printdlg.c
@@ -73,10 +73,16 @@ static void test_PageSetupDlgA(void)
pDlg->Flags = PSD_RETURNDEFAULT;
SetLastError(0xdeadbeef);
res = PageSetupDlgA(pDlg);
+ trace("after pagesetupdlga res = %d, le %d, ext error 0x%x\n",
+ res, GetLastError(), CommDlgExtendedError());
ok( res || (CommDlgExtendedError() == PDERR_NODEFAULTPRN),
"returned %u with %u and 0x%x (expected '!= 0' or '0' and "
"PDERR_NODEFAULTPRN)\n", res, GetLastError(), CommDlgExtendedError());
-
+ if (!res && (CommDlgExtendedError() == PDERR_NODEFAULTPRN)) {
+ skip("No printer configured.\n");
+ HeapFree(GetProcessHeap(), 0, pDlg);
+ return;
+ }
ok( pDlg->hDevMode && pDlg->hDevNames,
"got %p and %p (expected '!= NULL' for both)\n",
pDlg->hDevMode, pDlg->hDevNames);
More information about the wine-cvs
mailing list