diff options
author | m-holger <m-holger@kubitscheck.org> | 2024-02-10 20:26:40 +0100 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2024-02-16 11:54:08 +0100 |
commit | 9379b768118f465e94f826bed1daacbbc94938fc (patch) | |
tree | 42ed7da5ad3743eb46f6b1781364b246f9139470 /qpdf/qtest/qpdf-json.test | |
parent | d28969bf375d75ff7c1b911d84708727510a7a8a (diff) | |
download | qpdf-9379b768118f465e94f826bed1daacbbc94938fc.tar.zst |
Add additional name token JSON tests
Also, test writing JSON v1 files and files with deeply nested containers.
Diffstat (limited to 'qpdf/qtest/qpdf-json.test')
-rw-r--r-- | qpdf/qtest/qpdf-json.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qpdf/qtest/qpdf-json.test b/qpdf/qtest/qpdf-json.test index 9542bccf..defabbe7 100644 --- a/qpdf/qtest/qpdf-json.test +++ b/qpdf/qtest/qpdf-json.test @@ -350,7 +350,7 @@ $td->runtest("check C API write to JSON stream", # (using #xx) would generate invalid JSON, even though qpdf's own JSON # parser would accept it. Also, the JSON spec allows real numbers in # scientific notation, but the PDF spec does not. -$n_tests += 4; +$n_tests += 6; $td->runtest("handle binary names", {$td->COMMAND => "qpdf --json-output weird-tokens.pdf a.json"}, @@ -371,6 +371,14 @@ $td->runtest("weird tokens with scientific notation", "qpdf --json-input --json-output weird-tokens-alt.json -"}, {$td->FILE => "weird-tokens.json", $td->EXIT_STATUS => 0}, $td->NORMALIZE_NEWLINES); +$td->runtest("handle binary names (JSON v1)", + {$td->COMMAND => + "qpdf --json=1 weird-tokens.pdf a.json"}, + {$td->STRING => "", $td->EXIT_STATUS => 0}); +$td->runtest("check json", + {$td->FILE => "a.json"}, + {$td->FILE => "weird-tokens-v1.json"}, + $td->NORMALIZE_NEWLINES); cleanup(); $td->report($n_tests); |