Integration: --pdf-options null means no options

main (#731) and next fixed the same panic separately; main reads null as no
options and tests that the export succeeds, next's test listed null among the
errors. The CLI keeps main's reading.
This commit is contained in:
aiongg
2026-10-16 03:37:53 +00:00
parent f419fa2a7a
commit 27d7cc87bd
+2 -1
View File
@@ -217,10 +217,11 @@ fn closed_stdout_ends_quietly() {
}
/// `--pdf-options` that was JSON but no object (`[1]`) panicked when the PDF's path was added to it.
/// `null` means no options (see `pdf_options_that_are_not_an_object_are_an_error_not_a_panic`).
#[test]
fn run_pdf_options_that_are_no_object_are_an_error() {
let pdf = std::env::temp_dir().join(format!("dc-cli-options-{}.pdf", std::process::id()));
for options in ["[1]", "\"all\"", "1", "null"] {
for options in ["[1]", "\"all\"", "1"] {
let out = cli().args(["run", "--sample", "--pdf-options", options, "--export", pdf.to_str().unwrap()]).output().unwrap();
let err = String::from_utf8_lossy(&out.stderr);
assert!(!out.status.success(), "{options}: {err}");