Test the remaining CLI cases (closes #16)
check / check (push) Failing after 10s

Most of the command-line contract was already tested through run. This
adds what was missing: report and trees with no database exit 1 with
the message telling the user to run scan; a scan that skips an
unreadable file prints its warning and counts the skip in its summary;
the report and trees summary lines are checked exactly. The fatal-path
test now takes its subcommands from the command tree, so a new
subcommand wired without runE fails it. The nonexistent-operand test
gets an accurate name.

Model: opus-5-5
This commit is contained in:
2026-10-04 14:17:22 +00:00
parent e2227ac07e
commit eb5025370f
2 changed files with 97 additions and 16 deletions
+4
View File
@@ -29,6 +29,10 @@
# Completed Steps
- tests cover a missing database, the `scan` skip warning, the `report`
and `trees` summary lines, and every subcommand going through `runE`
(2026-10-04, https://git.eeqj.de/sneak/sfdupes/issues/16)
- `.golangci.yml` replaced with the current canonical copy, which uses
`gomodguard_v2`, so lint no longer prints a deprecation warning
(2026-10-04, https://git.eeqj.de/sneak/sfdupes/issues/26)