From b1092a7d4240d419cc2b5f3f5c326a1cb680bbdd Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 19 Jan 2019 18:59:55 +0100 Subject: [PATCH] tst_QPrinter: stabilize qprinter test The CreationDate entry in the two PDF files can potentially be different depending on when the test is run. 97b4c5a5746a33a27076d72ceb3533fbd54b9642 already accounts for it but the current tag for creation date is '/CreationDate'. Therefore check if the line contains 'CreationDate' instead. Change-Id: I1fc069cf935bba07084ac4a0743ff05312374d10 Reviewed-by: Thiago Macieira --- tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp index a65dd0bf8f4..abe4325278c 100644 --- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp +++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp @@ -644,7 +644,7 @@ void tst_QPrinter::taskQTBUG4497_reusePrinterOnDifferentFiles() QByteArray file1Line = file1.readLine(); QByteArray file2Line = file2.readLine(); - if (!file1Line.startsWith("%%CreationDate")) + if (!file1Line.contains("CreationDate")) QCOMPARE(file1Line, file2Line); }