mirror of
https://github.com/qpdf/qpdf.git
synced 2024-09-27 20:49:06 +00:00
83be2191b4
This includes the output PDF, streams from --show-object and attachments from --save-attachment. This also enables --verbose and --progress to work with saving to stdout.
37 lines
1.0 KiB
Perl
37 lines
1.0 KiB
Perl
#!/usr/bin/env perl
|
|
require 5.008;
|
|
use warnings;
|
|
use strict;
|
|
|
|
unshift(@INC, '.');
|
|
require qpdf_test_helpers;
|
|
|
|
chdir("qpdf") or die "chdir testdir failed: $!\n";
|
|
|
|
require TestDriver;
|
|
|
|
cleanup();
|
|
|
|
my $td = new TestDriver('progress-reporting');
|
|
|
|
my $n_tests = 3;
|
|
|
|
$td->runtest("progress report on small file",
|
|
{$td->COMMAND =>
|
|
"qpdf --progress --deterministic-id minimal.pdf a.pdf",
|
|
$td->FILTER => "perl filter-progress.pl"},
|
|
{$td->FILE => "small-progress.out", $td->EXIT_STATUS => 0},
|
|
$td->NORMALIZE_NEWLINES);
|
|
$td->runtest("progress report to stdout",
|
|
{$td->COMMAND =>
|
|
"qpdf --progress --deterministic-id minimal.pdf - > b.pdf",
|
|
$td->FILTER => "perl filter-progress.pl"},
|
|
{$td->FILE => "small-stdout-progress.out", $td->EXIT_STATUS => 0},
|
|
$td->NORMALIZE_NEWLINES);
|
|
$td->runtest("compare",
|
|
{$td->FILE => "a.pdf"},
|
|
{$td->FILE => "b.pdf"});
|
|
|
|
cleanup();
|
|
$td->report($n_tests);
|