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

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 scan tests
now capture the process's own stdout, which scan would write to
directly, so a stray stdout write in scan fails them. The fatal-path
test 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 was merged in pull request #90.
This commit is contained in:
2026-10-04 17:47:26 +02:00
parent e2227ac07e
commit 0b7078301d
3 changed files with 153 additions and 38 deletions
+4
View File
@@ -29,6 +29,10 @@
# Completed Steps
- tests cover a missing database, `scan` keeping stdout empty, its 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)