2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-01 01:40:51 +00:00

Split bug tests into separate chunk

This commit is contained in:
Jay Berkenbilt 2017-08-05 09:19:19 -04:00
parent ad0e29a3a4
commit a60eb552d3

View File

@ -205,21 +205,9 @@ $td->runtest("remove page we don't have",
$td->NORMALIZE_NEWLINES);
show_ntests();
# ----------
$td->notify("--- Miscellaneous Tests ---");
$n_tests += 95;
$td->runtest("qpdf version",
{$td->COMMAND => "qpdf --version"},
{$td->REGEXP => "qpdf version \\S+\n.*", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("C API: qpdf version",
{$td->COMMAND => "qpdf-ctest --version"},
{$td->REGEXP => "qpdf-ctest version \\S+\n",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
# Files to reproduce various bugs
foreach my $d (
$td->notify("--- Files for specific bugs ---");
# The number is the github issue number in which the bug was reported.
my @bug_tests = (
["51", "resolve loop", 3],
["99", "object 0", 2],
["99b", "object 0", 2],
@ -230,7 +218,9 @@ foreach my $d (
["119", "other infinite loop", 3],
["120", "other infinite loop", 3],
["106", "zlib data error", 3],
)
);
$n_tests += scalar(@bug_tests);
foreach my $d (@bug_tests)
{
my ($n, $description, $exit_status) = @$d;
$td->runtest($description,
@ -239,7 +229,20 @@ foreach my $d (
$td->EXIT_STATUS => $exit_status},
$td->NORMALIZE_NEWLINES);
}
show_ntests();
# ----------
$td->notify("--- Miscellaneous Tests ---");
$n_tests += 85;
$td->runtest("qpdf version",
{$td->COMMAND => "qpdf --version"},
{$td->REGEXP => "qpdf version \\S+\n.*", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("C API: qpdf version",
{$td->COMMAND => "qpdf-ctest --version"},
{$td->REGEXP => "qpdf-ctest version \\S+\n",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
foreach (my $i = 1; $i <= 3; ++$i)
{