diff options
author | Jay Berkenbilt <ejb@ql.org> | 2024-02-17 20:15:48 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2024-02-17 20:15:48 +0100 |
commit | e362bce8e86f4912eaa008bac06f9e2c19b72d3f (patch) | |
tree | 42fcd9eed699714f98ddee634763e4d670a2652b /qpdf/qtest/qpdf-json.test | |
parent | 5a29b7f9dd353c7baf2ca738bd2a56582a6525ea (diff) | |
parent | 413aba5bf2ef239d3abf024de3c819e153171035 (diff) | |
download | qpdf-e362bce8e86f4912eaa008bac06f9e2c19b72d3f.tar.zst |
Merge branch 'jw' from #1146 into work
Diffstat (limited to 'qpdf/qtest/qpdf-json.test')
-rw-r--r-- | qpdf/qtest/qpdf-json.test | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf-json.test b/qpdf/qtest/qpdf-json.test index 9542bccf..299bcd7e 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 += 7; $td->runtest("handle binary names", {$td->COMMAND => "qpdf --json-output weird-tokens.pdf a.json"}, @@ -371,6 +371,17 @@ $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); +$td->runtest("write JSON to pipeline", + {$td->COMMAND => "test_driver 98 minimal.pdf ''"}, + {$td->STRING => "test 98 done\n", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); cleanup(); $td->report($n_tests); |