diff options
| author | Paul Buetow <paul@buetow.org> | 2021-09-05 15:55:57 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-09-05 15:55:57 +0300 |
| commit | 64429c63054106e39d1a28c488d76db534ff2ed5 (patch) | |
| tree | 4a45169af49f22491cfbfa4bb3064381c3e20888 | |
| parent | bfcb0f159a4835cc6a0326ff46de7934e0363aed (diff) | |
fix unit test
| -rw-r--r-- | TODO.md | 3 | ||||
| -rw-r--r-- | internal/color/color_test.go | 8 |
2 files changed, 5 insertions, 6 deletions
@@ -4,8 +4,7 @@ TODO This is a loose list of what to do. Maybe for the next releae or maybe for a later one. [x] Finalize default color schema -[ ] Use a buffered string builder for brushing the colors in the client. -[ ] Extended color table output (print whole paragraphs in colors) +[x] Use a buffered string builder for brushing the colors in the client. [ ] Implement Benchmark cat-ing a file and compare to prev version. [ ] Client 4.x should print a warning when trying to connect to a 3.x server. [ ] Fix paintClientStats diff --git a/internal/color/color_test.go b/internal/color/color_test.go index bfc7c54..7002052 100644 --- a/internal/color/color_test.go +++ b/internal/color/color_test.go @@ -14,13 +14,13 @@ func TestColors(t *testing.T) { if err != nil { t.Errorf("unable to paint foreground : %s\n%v", text, err) } - builder.WriteString(PaintFg(text, fgColor)) + builder.WriteString(PaintStrFg(text, fgColor)) bgColor, err := ToBgColor(color) if err != nil { t.Errorf("unable to paint background: %s\n%v", text, err) } - builder.WriteString(PaintBg(text, bgColor)) + builder.WriteString(PaintStrBg(text, bgColor)) } for _, fg := range ColorNames { @@ -30,7 +30,7 @@ func TestColors(t *testing.T) { continue } bgColor, _ := ToBgColor(bg) - builder.WriteString(Paint(text, fgColor, bgColor)) + builder.WriteString(PaintStr(text, fgColor, bgColor)) } } @@ -46,7 +46,7 @@ func TestAttributes(t *testing.T) { if err != nil { t.Errorf("unable to paint attribute: %s\n%v", text, err) } - builder.WriteString(PaintWithAttr(text, FgWhite, BgBlue, att)) + builder.WriteString(PaintStrWithAttr(text, FgWhite, BgBlue, att)) } t.Log(builder.String()) |
