diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-05-20 20:23:32 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-05-20 20:23:32 +0200 |
commit | 9b2eb01e2505e301ce95d31f5387fea0de35eff0 (patch) | |
tree | dccacb3bf582d6deb2705b0fbc2f46d7f44bebb4 /qpdf/qtest | |
parent | 6c2fb5b8f0015b655edec9c6c44c3bbef44d03ba (diff) | |
download | qpdf-9b2eb01e2505e301ce95d31f5387fea0de35eff0.tar.zst |
Exercise object description in tests
Diffstat (limited to 'qpdf/qtest')
-rw-r--r-- | qpdf/qtest/qpdf-json.test | 10 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/qjson-object-not-dict.out | 2 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/test-89.out | 5 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/test-90.out | 5 |
4 files changed, 21 insertions, 1 deletions
diff --git a/qpdf/qtest/qpdf-json.test b/qpdf/qtest/qpdf-json.test index 22b714c5..c627da89 100644 --- a/qpdf/qtest/qpdf-json.test +++ b/qpdf/qtest/qpdf-json.test @@ -202,6 +202,16 @@ foreach my $f (@update_files) { {$td->FILE => "$f-updated.pdf"}); } +# Exercise object description +$n_tests += 2; +$td->runtest("json-input object description", + {$td->COMMAND => "test_driver 89 manual-qpdf-json.json"}, + {$td->FILE => "test-89.out", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); +$td->runtest("update-from-json object description", + {$td->COMMAND => "test_driver 90 good13.pdf various-updates.json"}, + {$td->FILE => "test-90.out", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); cleanup(); $td->report($n_tests); diff --git a/qpdf/qtest/qpdf/qjson-object-not-dict.out b/qpdf/qtest/qpdf/qjson-object-not-dict.out index cfb44457..1268c83d 100644 --- a/qpdf/qtest/qpdf/qjson-object-not-dict.out +++ b/qpdf/qtest/qpdf/qjson-object-not-dict.out @@ -1,2 +1,2 @@ -WARNING: qjson-object-not-dict.json (offset 100): "obj:1 0 R" must be a dictionary +WARNING: qjson-object-not-dict.json (obj:1 0 R, offset 100): "obj:1 0 R" must be a dictionary qpdf: qjson-object-not-dict.json: errors found in JSON diff --git a/qpdf/qtest/qpdf/test-89.out b/qpdf/qtest/qpdf/test-89.out new file mode 100644 index 00000000..97d71e1b --- /dev/null +++ b/qpdf/qtest/qpdf/test-89.out @@ -0,0 +1,5 @@ +WARNING: manual-qpdf-json.json, trailer at offset 1761: operation for array attempted on object of type dictionary: ignoring attempt to append item +WARNING: manual-qpdf-json.json, obj:1 0 R at offset 1079: operation for array attempted on object of type dictionary: ignoring attempt to append item +WARNING: manual-qpdf-json.json, obj:5 0 R at offset 1404: operation for dictionary attempted on object of type array: ignoring key replacement request +WARNING: manual-qpdf-json.json, obj:5 0 R at offset 1416: operation for dictionary attempted on object of type name: ignoring key replacement request +test 89 done diff --git a/qpdf/qtest/qpdf/test-90.out b/qpdf/qtest/qpdf/test-90.out new file mode 100644 index 00000000..2c535a09 --- /dev/null +++ b/qpdf/qtest/qpdf/test-90.out @@ -0,0 +1,5 @@ +WARNING: various-updates.json, trailer at offset 580: operation for array attempted on object of type dictionary: ignoring attempt to append item +WARNING: various-updates.json, obj:7 0 R at offset 171: operation for array attempted on object of type dictionary: ignoring attempt to append item +WARNING: various-updates.json, obj:7 0 R at offset 283: operation for integer attempted on object of type array: returning 0 +WARNING: good13.pdf, object 1 0 at offset 19: operation for array attempted on object of type dictionary: ignoring attempt to append item +test 90 done |