diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-05-19 23:27:41 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-05-20 15:16:25 +0200 |
commit | 6c5e590673331aa685afe8aa997b0b7e64996004 (patch) | |
tree | 66f14ee6b4a5bb6bc1f6bfa006d40ec9c8760b74 /qpdf/qtest/object-copying.test | |
parent | 6f43bf8de36b08c55b172b4f4133c79657651666 (diff) | |
download | qpdf-6c5e590673331aa685afe8aa997b0b7e64996004.tar.zst |
Rename all test files: _ to -
Diffstat (limited to 'qpdf/qtest/object-copying.test')
-rw-r--r-- | qpdf/qtest/object-copying.test | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/qpdf/qtest/object-copying.test b/qpdf/qtest/object-copying.test new file mode 100644 index 00000000..54d41b15 --- /dev/null +++ b/qpdf/qtest/object-copying.test @@ -0,0 +1,55 @@ +#!/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('object-copying'); + +my $n_tests = 9; + +$td->runtest("shallow copy an array", + {$td->COMMAND => "test_driver 20 shallow_array.pdf"}, + {$td->STRING => "test 20 done\n", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); +$td->runtest("check output", + {$td->FILE => "a.pdf"}, + {$td->FILE => "shallow_array-out.pdf"}); +$td->runtest("shallow copy a stream", + {$td->COMMAND => "test_driver 21 shallow_array.pdf"}, + {$td->FILE => "shallow_stream.out", $td->EXIT_STATUS => 2}, + $td->NORMALIZE_NEWLINES); +$td->runtest("warn for unknown key in Pages", + {$td->COMMAND => "test_driver 23 lin-special.pdf"}, + {$td->FILE => "pages-warning.out", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); +$td->runtest("reserved objects", + {$td->COMMAND => "test_driver 24 minimal.pdf"}, + {$td->FILE => "reserved-objects.out", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); +$td->runtest("check output", + {$td->FILE => "a.pdf"}, + {$td->FILE => "reserved-objects.pdf"}); +$td->runtest("detect foreign object in write", + {$td->COMMAND => "test_driver 29" . + " copy-foreign-objects-in.pdf minimal.pdf"}, + {$td->FILE => "foreign-in-write.out", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); +$td->runtest("copy a stream", + {$td->COMMAND => "test_driver 79 minimal.pdf"}, + {$td->STRING => "test 79 done\n", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); +$td->runtest("check output", + {$td->FILE => "a.pdf"}, + {$td->FILE => "test79.pdf"}); + +cleanup(); +$td->report($n_tests); |