mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-31 19:08:24 +00:00
33 lines
706 B
Plaintext
33 lines
706 B
Plaintext
|
#!/usr/bin/env perl
|
||
|
|
||
|
require 5.008;
|
||
|
BEGIN { $^W = 1; }
|
||
|
use strict;
|
||
|
|
||
|
chdir("qexc") or die "chdir qexc failed: $!\n";
|
||
|
|
||
|
require TestDriver;
|
||
|
|
||
|
my $td = new TestDriver('qexc');
|
||
|
|
||
|
my @tests =
|
||
|
(['general exception', 2],
|
||
|
['internal error', 3],
|
||
|
['system exception', 2],
|
||
|
['library exception', 3, "uncaught exception: .+\n"], # fails on VC7?
|
||
|
);
|
||
|
|
||
|
for (my $i = 0; $i < scalar(@tests); ++$i)
|
||
|
{
|
||
|
my $output = +((-f "test$i.out")
|
||
|
? {$td->FILE => "test$i.out"}
|
||
|
: {$td->REGEXP => $tests[$i]->[2]});
|
||
|
$output->{$td->EXIT_STATUS} = $tests[$i]->[1];
|
||
|
$td->runtest($tests[$i]->[0],
|
||
|
{$td->COMMAND => "qexc $i"},
|
||
|
$output,
|
||
|
$td->NORMALIZE_NEWLINES);
|
||
|
}
|
||
|
|
||
|
$td->report(scalar(@tests));
|