mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 15:17:29 +00:00
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.
This commit is contained in:
parent
04fe9cc257
commit
5963267b5f
4
TODO
4
TODO
@ -5,10 +5,6 @@ Next
|
|||||||
|
|
||||||
* Fix documentation errors in debian bug reports
|
* Fix documentation errors in debian bug reports
|
||||||
|
|
||||||
* good17.pdf, good18.pdf, and hybrid-xref.pdf have incorrect hybrid
|
|
||||||
reference sections. Review section 3.4 of the PDF specification
|
|
||||||
and make sure ghostscript doesn't complain about the files.
|
|
||||||
|
|
||||||
General
|
General
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
@ -1463,10 +1463,18 @@ sub compare_pdfs
|
|||||||
}
|
}
|
||||||
else
|
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->runtest("convert original file to image",
|
||||||
{$td->COMMAND =>
|
{$td->COMMAND =>
|
||||||
"(cd tif1;" .
|
"(cd tif1;" .
|
||||||
" gs -q -dNOPAUSE -sDEVICE=tiff12nc" .
|
" gs 2>/dev/null -q -dNOPAUSE -sDEVICE=tiff12nc" .
|
||||||
" -sOutputFile=a.tif - < ../$f1)"},
|
" -sOutputFile=a.tif - < ../$f1)"},
|
||||||
{$td->STRING => "",
|
{$td->STRING => "",
|
||||||
$td->EXIT_STATUS => 0});
|
$td->EXIT_STATUS => 0});
|
||||||
@ -1485,7 +1493,7 @@ sub compare_pdfs
|
|||||||
$td->runtest("convert new file to image",
|
$td->runtest("convert new file to image",
|
||||||
{$td->COMMAND =>
|
{$td->COMMAND =>
|
||||||
"(cd tif2;" .
|
"(cd tif2;" .
|
||||||
" gs -q -dNOPAUSE -sDEVICE=tiff12nc" .
|
" gs 2>/dev/null -q -dNOPAUSE -sDEVICE=tiff12nc" .
|
||||||
" -sOutputFile=a.tif - < ../$f2)"},
|
" -sOutputFile=a.tif - < ../$f2)"},
|
||||||
{$td->STRING => "",
|
{$td->STRING => "",
|
||||||
$td->EXIT_STATUS => 0});
|
$td->EXIT_STATUS => 0});
|
||||||
|
Loading…
Reference in New Issue
Block a user