summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-09-05 15:55:57 +0300
committerPaul Buetow <paul@buetow.org>2021-09-05 15:55:57 +0300
commit64429c63054106e39d1a28c488d76db534ff2ed5 (patch)
tree4a45169af49f22491cfbfa4bb3064381c3e20888
parentbfcb0f159a4835cc6a0326ff46de7934e0363aed (diff)
fix unit test
-rw-r--r--TODO.md3
-rw-r--r--internal/color/color_test.go8
2 files changed, 5 insertions, 6 deletions
diff --git a/TODO.md b/TODO.md
index 45c9c3b..7fbcca4 100644
--- a/TODO.md
+++ b/TODO.md
@@ -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())