From bb8b547023b0867f31d7452faceef5769a45b94b Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 14 Sep 2026 23:40:56 +0200 Subject: explain: shows a duplicate's skipped delete, leaves the cache alone, walks only for duplicate tests --- cmd/krino/sort_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/krino/sort_test.go') diff --git a/cmd/krino/sort_test.go b/cmd/krino/sort_test.go index 321c9e8..12edb24 100644 --- a/cmd/krino/sort_test.go +++ b/cmd/krino/sort_test.go @@ -225,4 +225,10 @@ func TestDryRunShowsNeverDeletedSkip(t *testing.T) { if !strings.Contains(out, "skipped: a duplicate is never deleted") { t.Errorf("plan lacks the skipped delete:\n%s", out) } + // explain shows it too, for the copy that is the duplicate (triage 30a). + _, outA, _ := runCLI(t, "explain", filepath.Join(dl, "a.pdf")) + _, outB, _ := runCLI(t, "explain", filepath.Join(dl, "b.pdf")) + if strings.Count(outA+outB, "a duplicate is never deleted") != 1 { + t.Errorf("explain should name the skipped delete for exactly one copy:\n%s\n%s", outA, outB) + } } -- cgit v1.3