pdfcraft/apps/pdfcraft-cli/tests
wstock 7bed2d393c
CLI: edit rejects unknown options instead of writing an unchanged copy (#133) (#227)
A misspelled option such as `--rotat` fell through the argument loop's
`_ => {}`, so `pdfcraft-cli edit` wrote a byte-identical copy of the input
and exited 0: an apparently successful edit that did nothing.

Every argument is now parsed before the file is opened. An unknown `--option`
fails with the list of accepted ones, an option without its value is refused,
and a second positional argument is reported. The documented options behave
as before (`--out`, `--password`, `--full` and the edits), and nothing is
written for a rejected command line.

Co-authored-by: William Stock <1394687+wstock@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-08 03:39:27 -04:00
..
edit.rs CLI: edit rejects unknown options instead of writing an unchanged copy (#133) (#227) 2026-10-08 03:39:27 -04:00
run_root.rs Security: --root confinement leaks and escapes (#136, #137) (#164) 2026-10-07 21:12:32 -04:00
stdout.rs Restore #196, #202, #203 and the macOS release-runner change, reverted by the i18n chain (#229) 2026-10-08 03:33:35 -04:00
text.rs CLI: text exits non-zero when a selected page cannot be read (#131) (#139) 2026-10-07 21:14:25 -04:00