aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2023-12-20 13:44:19 +0100
committerJay Berkenbilt <ejb@ql.org>2023-12-20 21:46:20 +0100
commit321f9e79db85fe67a3cc498780dbe88602483b16 (patch)
tree3cee1e9988f7441ec4d4e54319b94e8aff46ebaa /qpdf
parent647b9831dc5cb2f2bfe775a8802416cdd51ed59d (diff)
downloadqpdf-321f9e79db85fe67a3cc498780dbe88602483b16.tar.zst
Fix tests with deterministic IDs
Diffstat (limited to 'qpdf')
-rw-r--r--qpdf/qtest/error-condition.test8
-rw-r--r--qpdf/qtest/form-xobject.test4
-rw-r--r--qpdf/qtest/many-nulls.test5
-rw-r--r--qpdf/qtest/replace-input.test12
-rw-r--r--qpdf/qtest/type-checks.test4
5 files changed, 17 insertions, 16 deletions
diff --git a/qpdf/qtest/error-condition.test b/qpdf/qtest/error-condition.test
index d9357a0f..097190e8 100644
--- a/qpdf/qtest/error-condition.test
+++ b/qpdf/qtest/error-condition.test
@@ -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);
diff --git a/qpdf/qtest/form-xobject.test b/qpdf/qtest/form-xobject.test
index 3183a219..2a9bac83 100644
--- a/qpdf/qtest/form-xobject.test
+++ b/qpdf/qtest/form-xobject.test
@@ -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);
diff --git a/qpdf/qtest/many-nulls.test b/qpdf/qtest/many-nulls.test
index c3eefa1f..744075f0 100644
--- a/qpdf/qtest/many-nulls.test
+++ b/qpdf/qtest/many-nulls.test
@@ -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},
diff --git a/qpdf/qtest/replace-input.test b/qpdf/qtest/replace-input.test
index 70a37cc2..5c1a9df2 100644
--- a/qpdf/qtest/replace-input.test
+++ b/qpdf/qtest/replace-input.test
@@ -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"});
diff --git a/qpdf/qtest/type-checks.test b/qpdf/qtest/type-checks.test
index 17b3c994..73cb7fb6 100644
--- a/qpdf/qtest/type-checks.test
+++ b/qpdf/qtest/type-checks.test
@@ -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",