Add test cases for fix-qpdf from pipe

This commit is contained in:
Jay Berkenbilt 2023-09-02 15:23:52 -04:00
parent 1db8a8b26f
commit 290a672141
2 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,15 @@
2023-09-02 Jay Berkenbilt <ejb@ql.org>
* Bug fix from M. Holger: allow fix-qdf to read from pipe. Fixes #1010.
* Bug fix: maintain links to foreign pages when copying foreign
objects. This corrects a possible crash.
* Add /MediaBox to a page if absent. Thanks M. Holger.
* Use std::vector internally for Pl_Buffer to
avoid incompatibility with C++20. Thanks to Zoe Clifford. Fixes #1024.
2023-07-09 Jay Berkenbilt <ejb@ql.org>
* 11.5.0: release

View File

@ -28,6 +28,27 @@ for (my $n = 1; $n <= 2; ++$n)
{$td->FILE => "fix$n.qdf.out",
$td->EXIT_STATUS => 0});
}
if (! (($^O eq 'MSWin32') || ($^O eq 'Win32') || ($^O eq 'msys')))
{
# The pipe tests are unstable on Windows. It has not been
# determined whether this is because the code doesn't work or the
# tests don't work, but as of September 2023, I think it works
# with MSVC and not with mingw. Fixing fix-qdf to read from pipes
# on Windows is not a high priority, but patches are welcome.
$n_tests += 4;
for (my $n = 1; $n <= 2; ++$n)
{
$td->runtest("fix-qdf $n from pipe",
{$td->COMMAND => "cat fix$n.qdf | fix-qdf "},
{$td->FILE => "fix$n.qdf.out",
$td->EXIT_STATUS => 0});
$td->runtest("identity fix-qdf $n",
{$td->COMMAND => "fix-qdf fix$n.qdf.out"},
{$td->FILE => "fix$n.qdf.out",
$td->EXIT_STATUS => 0});
}
}
$td->runtest("fix-qdf with big object stream", # > 255 objects in a stream
{$td->COMMAND => "fix-qdf big-ostream.pdf"},
{$td->FILE => "big-ostream.pdf",