diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 11:05:13 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 11:05:13 +0200 |
| commit | adc3410395771609d2db5ee5ae2b9da71115c5ca (patch) | |
| tree | 453def41e18f607332be1088920f9d0c563603a3 /cmd/krino/render_test.go | |
| parent | 0468ce38470aa3ae8092b92d4f77e72d25dfa108 (diff) | |
| download | krino-adc3410395771609d2db5ee5ae2b9da71115c5ca.tar.gz krino-adc3410395771609d2db5ee5ae2b9da71115c5ca.zip | |
krino: coloured output, and --no-color
One palette type styles the plan table, warnings, headers, outcome counts,
prompt keys, undo's refused steps and krino log's (undone), from the
16-colour ANSI palette plus bold and faint only. Widths are measured on the
plain text, so columns line up; with colour off the output is unchanged.
--no-color works before or after any subcommand, as NO_COLOR does. The two
search-and-replace colourings are gone.
Diffstat (limited to 'cmd/krino/render_test.go')
| -rw-r--r-- | cmd/krino/render_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/krino/render_test.go b/cmd/krino/render_test.go index 0a6ae26..6f29b51 100644 --- a/cmd/krino/render_test.go +++ b/cmd/krino/render_test.go @@ -90,7 +90,7 @@ func TestPrintPlan(t *testing.T) { } var buf bytes.Buffer - printPlan(&buf, dp, false) + printPlan(&buf, dp, false, palette{}) out := buf.String() for _, want := range []string{ @@ -138,7 +138,7 @@ func TestPrintPlanSkippedStep(t *testing.T) { }, } var buf bytes.Buffer - printPlan(&buf, dp, false) + printPlan(&buf, dp, false, palette{}) out := buf.String() if !strings.Contains(out, "copy skipped: target exists") { t.Errorf("skipped step should show its reason in place of the destination:\n%s", out) @@ -191,7 +191,7 @@ func TestPrintPlanRowNumberAlignment(t *testing.T) { } var buf bytes.Buffer - printPlan(&buf, dp, false) + printPlan(&buf, dp, false, palette{}) out := buf.String() for _, want := range []string{ @@ -235,7 +235,7 @@ func TestPrintPlanCountsFileOnceWithBothWarningKinds(t *testing.T) { }, } var buf bytes.Buffer - printPlan(&buf, dp, false) + printPlan(&buf, dp, false, palette{}) out := buf.String() for _, want := range []string{ |
