[PATCH] comdlg32/tests: Handle result from broken drivers [try2]

Detlef Riekenberg wine.dev at web.de
Mon Aug 26 14:29:30 CDT 2013


As example: HP Deskjet 3050
http://test.winehq.org/data/73aef4031335b0b6640014f79c4cc4bc335dd910/xp_da24rn25ol/comdlg32:printdlg.html

As example: PSC-2170-Series
http://test.winehq.org/data/52fb1cc245f2b5156e2416d9630fa1cd857a5ae2/2003_fg-win2003es-last/comdlg32:printdlg.html

try2:
Sorry for the copy & paste error in try 1

--
Regards ... Detlef
---
 dlls/comdlg32/tests/printdlg.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/comdlg32/tests/printdlg.c b/dlls/comdlg32/tests/printdlg.c
index d0b0443..7212dc4 100644
--- a/dlls/comdlg32/tests/printdlg.c
+++ b/dlls/comdlg32/tests/printdlg.c
@@ -257,7 +257,9 @@ static void test_PrintDlgA(void)
         ok(pDlg->nCopies == 123 || broken(pDlg->nCopies == 1), "expected nCopies 123, got %d\n", pDlg->nCopies);
         ok(pDlg->hDevMode != 0, "hDevMode should not be 0\n");
         dm = GlobalLock(pDlg->hDevMode);
-        ok(S1(U1(*dm)).dmCopies == 1, "expected dm->dmCopies 1, got %d\n", S1(U1(*dm)).dmCopies);
+        /* some broken drivers use always PD_USEDEVMODECOPIES */
+        ok((S1(U1(*dm)).dmCopies == 1) || broken(S1(U1(*dm)).dmCopies == 123),
+            "expected dm->dmCopies 1, got %d\n", S1(U1(*dm)).dmCopies);
         GlobalUnlock(pDlg->hDevMode);
         GlobalFree(pDlg->hDevMode);
         GlobalFree(pDlg->hDevNames);
-- 
1.7.5.4




More information about the wine-patches mailing list