mirror of
https://github.com/qpdf/qpdf.git
synced 2024-09-28 21:19:06 +00:00
173b944ef8
This makes it a lot easier to run parts of the test suite.
29 lines
612 B
Perl
29 lines
612 B
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('precheck_streams');
|
|
|
|
my $n_tests = 2;
|
|
|
|
$td->runtest("bad stream",
|
|
{$td->COMMAND => "qpdf --static-id bad-data.pdf a.pdf"},
|
|
{$td->FILE => "bad-data.out", $td->EXIT_STATUS => 3},
|
|
$td->NORMALIZE_NEWLINES);
|
|
$td->runtest("check output",
|
|
{$td->FILE => "a.pdf"},
|
|
{$td->FILE => "bad-data-out.pdf"});
|
|
|
|
cleanup();
|
|
$td->report($n_tests);
|