diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-05-19 00:22:57 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-05-20 15:16:25 +0200 |
commit | 6f43bf8de36b08c55b172b4f4133c79657651666 (patch) | |
tree | ec17bbf42d9ea78d44ab3b9d2cac363cc6b9bc68 /qpdf/qtest/qpdf-json.test | |
parent | 23fc6756f1894e1af35853eb2251f08d5b25cf30 (diff) | |
download | qpdf-6f43bf8de36b08c55b172b4f4133c79657651666.tar.zst |
Major rework -- see long comments
* Replace --create-from-json=file with --json-input, which causes the
regular input to be treated as json.
* Eliminate --to-json
* In --json=2, bring back "objects" and eliminate "objectinfo". Stream
data is never present.
* In --json-output=2, write "qpdf-v2" with "objects" and include
stream data.
Diffstat (limited to 'qpdf/qtest/qpdf-json.test')
-rw-r--r-- | qpdf/qtest/qpdf-json.test | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/qpdf/qtest/qpdf-json.test b/qpdf/qtest/qpdf-json.test deleted file mode 100644 index 89d5cd4e..00000000 --- a/qpdf/qtest/qpdf-json.test +++ /dev/null @@ -1,53 +0,0 @@ -#!/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('qpdf-json'); - -my $n_tests = 0; - -my @badfiles = ( - 'no-qpdf-object', - 'no-json-version', - 'no-pdf-version', - 'top-level-scalar', - 'bad-json-version1', - 'bad-json-version2', - 'bad-pdf-version1', - 'bad-pdf-version2', - 'top-level-array', - 'objects-not-dict', - 'bad-object-key', - 'object-not-dict', - 'stream-not-dict', - 'stream-dict-not-dict', - 'trailer-not-dict', - 'trailer-stream', - 'missing-trailer', - 'missing-objects', - 'obj-key-errors', - ); - -$n_tests += scalar(@badfiles); - -foreach my $f (@badfiles) -{ - $td->runtest("bad: $f", - {$td->COMMAND => - "qpdf --create-from-json=qjson-$f.json a.pdf"}, - {$td->FILE => "qjson-$f.out", $td->EXIT_STATUS => 2}, - $td->NORMALIZE_NEWLINES); -} - -cleanup(); -$td->report($n_tests); |