mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 02:49:00 +00:00
Fix tests with deterministic IDs
This commit is contained in:
parent
647b9831dc
commit
321f9e79db
@ -194,8 +194,8 @@ $td->runtest("xref loop with append",
|
||||
$td->EXIT_STATUS => 3},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
$td->runtest("check output",
|
||||
{$td->FILE => "a.pdf"},
|
||||
{$td->FILE => "append-xref-loop-fixed.pdf"});
|
||||
{$td->COMMAND => "qpdf-test-compare a.pdf append-xref-loop-fixed.pdf"},
|
||||
{$td->FILE => "append-xref-loop-fixed.pdf", $td->EXIT_STATUS => 0});
|
||||
|
||||
$td->runtest("endobj not at newline",
|
||||
{$td->COMMAND =>
|
||||
@ -204,8 +204,8 @@ $td->runtest("endobj not at newline",
|
||||
$td->EXIT_STATUS => 3},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
$td->runtest("check output",
|
||||
{$td->FILE => "a.pdf"},
|
||||
{$td->FILE => "endobj-at-eol-fixed.pdf"});
|
||||
{$td->COMMAND => "qpdf-test-compare a.pdf endobj-at-eol-fixed.pdf"},
|
||||
{$td->FILE => "endobj-at-eol-fixed.pdf", $td->EXIT_STATUS => 0});
|
||||
|
||||
cleanup();
|
||||
$td->report($n_tests);
|
||||
|
@ -94,8 +94,8 @@ $td->runtest("overlay on page with no resources",
|
||||
{$td->STRING => "", $td->EXIT_STATUS => 0},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
$td->runtest("check overlay with no resources output",
|
||||
{$td->FILE => "a.pdf"},
|
||||
{$td->FILE => "overlay-no-resources.pdf"});
|
||||
{$td->COMMAND => "qpdf-test-compare a.pdf overlay-no-resources.pdf"},
|
||||
{$td->FILE => "overlay-no-resources.pdf", $td->EXIT_STATUS => 0});
|
||||
|
||||
cleanup();
|
||||
$td->report($n_tests);
|
||||
|
@ -23,9 +23,8 @@ $td->runtest("create file with many nulls",
|
||||
{$td->STRING => "", $td->EXIT_STATUS => 0},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
$td->runtest("compare output",
|
||||
{$td->FILE => "a.pdf"},
|
||||
{$td->FILE => "many-nulls.pdf"},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
{$td->COMMAND => "qpdf-test-compare a.pdf many-nulls.pdf"},
|
||||
{$td->FILE => "many-nulls.pdf", $td->EXIT_STATUS => 0});
|
||||
$td->runtest("run check file",
|
||||
{$td->COMMAND => "qpdf --check a.pdf"},
|
||||
{$td->FILE => "many-nulls.out", $td->EXIT_STATUS => 0},
|
||||
|
@ -32,10 +32,12 @@ foreach my $d (['auto-ü', 1], ['auto-öπ', 2])
|
||||
" --object-streams=generate --replace-input ./$u.pdf"},
|
||||
{$td->STRING => "", $td->EXIT_STATUS => 0},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
# qpdf handles Unicode filenames on Windows, but qpdf-test-compare
|
||||
# doesn't.
|
||||
rename("$u.pdf", "u.pdf") or die;
|
||||
$td->runtest("check output ($u)",
|
||||
{$td->FILE => "$u.pdf"},
|
||||
{$td->FILE => "replace-input.pdf"},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
{$td->COMMAND => "qpdf-test-compare u.pdf replace-input.pdf"},
|
||||
{$td->FILE => "replace-input.pdf", $td->EXIT_STATUS => 0});
|
||||
}
|
||||
|
||||
system("cp xref-with-short-size.pdf auto-warn.pdf") == 0 or die;
|
||||
@ -46,8 +48,8 @@ $td->runtest("replace input with warnings",
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
|
||||
$td->runtest("check output",
|
||||
{$td->FILE => "auto-warn.pdf"},
|
||||
{$td->FILE => "warn-replace.pdf"});
|
||||
{$td->COMMAND => "qpdf-test-compare auto-warn.pdf warn-replace.pdf"},
|
||||
{$td->FILE => "warn-replace.pdf", $td->EXIT_STATUS => 0});
|
||||
$td->runtest("check orig output",
|
||||
{$td->FILE => "auto-warn.pdf.~qpdf-orig"},
|
||||
{$td->FILE => "xref-with-short-size.pdf"});
|
||||
|
@ -27,8 +27,8 @@ $td->runtest("ensure object-types-os is up-to-date",
|
||||
" object-types.pdf a.pdf"},
|
||||
{$td->STRING => "", $td->EXIT_STATUS => 0});
|
||||
$td->runtest("check file",
|
||||
{$td->FILE => "a.pdf"},
|
||||
{$td->FILE => "object-types-os.pdf"});
|
||||
{$td->COMMAND => "qpdf-test-compare a.pdf object-types-os.pdf"},
|
||||
{$td->FILE => "object-types-os.pdf", $td->EXIT_STATUS => 0});
|
||||
$td->runtest("type checks",
|
||||
{$td->COMMAND => "test_driver 42 object-types.pdf"},
|
||||
{$td->FILE => "object-types.out",
|
||||
|
Loading…
Reference in New Issue
Block a user