summaryrefslogtreecommitdiffstats
path: root/qpdf/qtest/mutability.test
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-14 22:16:20 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-14 23:35:06 +0200
commit173b944ef8f1dd3f971a6089a52fcd1ae07ca8f1 (patch)
treead6f8c53b76b6975ddb8abe1cdc64d7677d58aee /qpdf/qtest/mutability.test
parent4b642caf1114f6a354c21444d1fdccba3cb894b9 (diff)
downloadqpdf-173b944ef8f1dd3f971a6089a52fcd1ae07ca8f1.tar.zst
Split qpdf.test into multiple test suites
This makes it a lot easier to run parts of the test suite.
Diffstat (limited to 'qpdf/qtest/mutability.test')
-rw-r--r--qpdf/qtest/mutability.test47
1 files changed, 47 insertions, 0 deletions
diff --git a/qpdf/qtest/mutability.test b/qpdf/qtest/mutability.test
new file mode 100644
index 00000000..42d323a9
--- /dev/null
+++ b/qpdf/qtest/mutability.test
@@ -0,0 +1,47 @@
+#!/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('mutability');
+
+my $n_tests = 5;
+
+$td->runtest("no normalization",
+ {$td->COMMAND => "test_driver 4 test4-1.pdf"},
+ {$td->FILE => "test4-1.qdf",
+ $td->EXIT_STATUS => 0});
+
+$td->runtest("object ordering",
+ {$td->COMMAND => "test_driver 4 test4-4.pdf"},
+ {$td->FILE => "test4-4.qdf",
+ $td->EXIT_STATUS => 0});
+
+$td->runtest("make direct with allow_streams",
+ {$td->COMMAND => "test_driver 4 test4-5.pdf"},
+ {$td->FILE => "test4-5.qdf",
+ $td->EXIT_STATUS => 0});
+
+$td->runtest("stream detected",
+ {$td->COMMAND => "test_driver 4 test4-2.pdf"},
+ {$td->FILE => "test4-2.out",
+ $td->EXIT_STATUS => 2},
+ $td->NORMALIZE_NEWLINES);
+
+$td->runtest("loop detected",
+ {$td->COMMAND => "test_driver 4 test4-3.pdf"},
+ {$td->FILE => "test4-3.out",
+ $td->EXIT_STATUS => 2},
+ $td->NORMALIZE_NEWLINES);
+
+cleanup();
+$td->report($n_tests);