aboutsummaryrefslogtreecommitdiff
path: root/cmd/krino/matching_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/krino/matching_test.go')
-rw-r--r--cmd/krino/matching_test.go47
1 files changed, 23 insertions, 24 deletions
diff --git a/cmd/krino/matching_test.go b/cmd/krino/matching_test.go
index 754e577..4ce2205 100644
--- a/cmd/krino/matching_test.go
+++ b/cmd/krino/matching_test.go
@@ -180,10 +180,10 @@ func TestCheckListsExtractors(t *testing.T) {
}
}
-// TestDryRunWarningsSortedByRel is controller ruling 2026-09-12: the
-// warnings section is one Rel-sorted list across matched and unmatched
-// files, not matched files followed by unmatched files - a reader scans it
-// by name and has no way to see which group a file fell into. "cover.pdf"
+// TestDryRunWarningsSortedByRel: the warnings section is one Rel-sorted
+// list across matched and unmatched files, not matched files followed by
+// unmatched files - a reader scans it by name and has no way to see which
+// group a file fell into. "cover.pdf"
// matches "pdfs" but still carries the warning "acme" recorded before it
// gave up; "brochure.doc" never matches at all. Their Rel order
// ("brochure.doc" < "cover.pdf") is the reverse of matched-then-unmatched
@@ -230,7 +230,7 @@ func TestDryRunWarningsSortedByRel(t *testing.T) {
}
}
-// TestDirectoryWarningAfterHeader: C3. A directory-level warning must be
+// TestDirectoryWarningAfterHeader: a directory-level warning must be
// emitted after its own header line, not before it, so on a terminal (both
// streams sharing one tty, hence stdout and stderr driven into the same
// buffer here to observe their relative order) it reads as describing the
@@ -272,8 +272,8 @@ func TestDirectoryWarningAfterHeader(t *testing.T) {
}
}
-// TestSortSkipsMissingRootAndContinues: C5, the exit-1 skip path. A
-// directory whose root has vanished since it was configured is skipped
+// TestSortSkipsMissingRootAndContinues: the exit-1 skip path. A directory
+// whose root has vanished since it was configured is skipped
// with one line on stderr naming it, but every other directory is still
// processed, with a blank line still separating their two outputs, and
// the run as a whole exits 1.
@@ -311,8 +311,8 @@ func TestSortSkipsMissingRootAndContinues(t *testing.T) {
}
}
-// TestDirectoryWarningNotCountedInWarningsField: C5. A directory-level
-// warning is printed as "krino: NAME: <warning>" on stderr, but is not one
+// TestDirectoryWarningNotCountedInWarningsField: a directory-level warning
+// is printed as "krino: NAME: <warning>" on stderr, but is not one
// of the per-file warnings the "N warnings" field in the summary line
// counts.
func TestDirectoryWarningNotCountedInWarningsField(t *testing.T) {
@@ -352,14 +352,14 @@ func TestDirectoryWarningNotCountedInWarningsField(t *testing.T) {
}
}
-// TestLongNameNotPaddedLayoutIntact: C5, the 40-character cap. A file name
+// TestLongNameNotPaddedLayoutIntact: the 40-character cap. A file name
// longer than the 40-character column cap is left unpadded (not truncated,
// not stretched further), while a short name alongside it is still padded
// out to the full 40-column cap — the layout stays a clean two-column grid
// even though one row's first cell overruns it.
-// TestApplyWithYesMovesFiles is brief 7's basic apply-path test: -y applies
-// the plan with no prompt, the file actually moves, the outcome line says
-// so, and the run is logged with both boundaries.
+// TestApplyWithYesMovesFiles is the basic apply-path test: -y applies the
+// plan with no prompt, the file actually moves, the outcome line says so,
+// and the run is logged with both boundaries.
func TestApplyWithYesMovesFiles(t *testing.T) {
h := matchingFixture(t)
code, out, errOut := runCLI(t, "-y")
@@ -382,9 +382,9 @@ func TestApplyWithYesMovesFiles(t *testing.T) {
}
}
-// TestDryRunLogsNothing is Ruling 2: journal.Open must never be called at
-// all in dry-run mode, since it materialises both the state directory and
-// an empty log file as a side effect of merely opening it.
+// TestDryRunLogsNothing: journal.Open must never be called at all in
+// dry-run mode, since it materialises both the state directory and an
+// empty log file as a side effect of merely opening it.
func TestDryRunLogsNothing(t *testing.T) {
h := matchingFixture(t)
if code, _, errOut := runCLI(t, "-n"); code != 0 {
@@ -425,11 +425,10 @@ func TestSecondRunFailsImmediatelyWithYes(t *testing.T) {
}
}
-// TestFlagsMustPrecedeDirectoryNames is Ruling 4: Go's flag package stops
-// parsing at the first non-flag argument, so "krino dl -n" would otherwise
-// silently take "-n" as a second directory name and never honour the dry
-// run. A leftover argument starting with "-" is a usage error instead of a
-// guess.
+// TestFlagsMustPrecedeDirectoryNames: Go's flag package stops parsing at
+// the first non-flag argument, so "krino dl -n" would otherwise silently
+// take "-n" as a second directory name and never honour the dry run. A
+// leftover argument starting with "-" is a usage error instead of a guess.
func TestFlagsMustPrecedeDirectoryNames(t *testing.T) {
home(t)
code, _, errOut := runCLI(t, "dl", "-n")
@@ -438,8 +437,8 @@ func TestFlagsMustPrecedeDirectoryNames(t *testing.T) {
}
}
-// TestNoColourEscapeToNonTerminal is Ruling 7's one pinned guarantee: a plan
-// piped to a file or read by another tool must be plain text. tui.Colour(w)
+// TestNoColourEscapeToNonTerminal pins one guarantee: a plan piped to a
+// file or read by another tool must be plain text. tui.Colour(w)
// already returns false for anything that is not a terminal *os.File, and
// runCLI's stdout is a bytes.Buffer, so this holds end to end through the
// real command path, not just at the helper that decides it.
@@ -502,7 +501,7 @@ func TestLongNameGetsItsOwnLine(t *testing.T) {
// TestDryRunJSONCarriesExclusionsAndWarnings: the JSON plan says which
// exclude set a file aside and carries the warnings matching raised, for
-// matched and unmatched files alike, as the text plan does (triage 28h).
+// matched and unmatched files alike, as the text plan does.
func TestDryRunJSONCarriesExclusionsAndWarnings(t *testing.T) {
h := home(t)
dl := filepath.Join(h, "dl")