diff options
author | Jay Berkenbilt <ejb@ql.org> | 2011-12-28 20:02:07 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2011-12-28 20:02:07 +0100 |
commit | 5963267b5f497dbede86c0c9aa8850f4024d14a6 (patch) | |
tree | 37cd91e3bb37d6ef1aec5a0fac5c613accd11654 /qpdf | |
parent | 04fe9cc257944e92c5bd2e53534a9f2cee82ac70 (diff) | |
download | qpdf-5963267b5f497dbede86c0c9aa8850f4024d14a6.tar.zst |
Discard stderr from gs when comparing images.
This works around cases where gs falsely complains about things in the
PDF files or gives warnings that don't harm the output. See comments
in qpdf.test for details.
Diffstat (limited to 'qpdf')
-rw-r--r-- | qpdf/qtest/qpdf.test | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index b9e14a36..03e114f7 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -1463,10 +1463,18 @@ sub compare_pdfs } else { + # We discard gs's stderr since it has sometimes been known to + # complain about files that are not bad. In particular, gs + # 9.04 can't handle empty xref sections such as those found in + # the hybrid xref cases. We don't really care whether gs + # complains or not as long as it creates correct images. If + # it doesn't create correct images, the test will fail, and we + # can run manually to see the error message. If it does, then + # we don't care about the warning. $td->runtest("convert original file to image", {$td->COMMAND => "(cd tif1;" . - " gs -q -dNOPAUSE -sDEVICE=tiff12nc" . + " gs 2>/dev/null -q -dNOPAUSE -sDEVICE=tiff12nc" . " -sOutputFile=a.tif - < ../$f1)"}, {$td->STRING => "", $td->EXIT_STATUS => 0}); @@ -1485,7 +1493,7 @@ sub compare_pdfs $td->runtest("convert new file to image", {$td->COMMAND => "(cd tif2;" . - " gs -q -dNOPAUSE -sDEVICE=tiff12nc" . + " gs 2>/dev/null -q -dNOPAUSE -sDEVICE=tiff12nc" . " -sOutputFile=a.tif - < ../$f2)"}, {$td->STRING => "", $td->EXIT_STATUS => 0}); |