diff options
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); |