boot v2 progress: disks, ssh, success...

This commit is contained in:
Mikaël Cluseau
2022-03-08 11:45:56 +01:00
parent 8e86579004
commit 8506f8807d
38 changed files with 1767 additions and 113 deletions

21
colorio/colorio_test.go Normal file
View File

@ -0,0 +1,21 @@
package colorio
import (
"bytes"
"fmt"
"testing"
)
func TestWriter(t *testing.T) {
buf := new(bytes.Buffer)
w := NewWriter(Bold, buf)
buf.WriteByte('{')
fmt.Fprintln(w, "hello")
buf.WriteByte('}')
if s, exp := buf.String(), "{"+string(Bold)+"hello\n"+string(Reset)+"}"; s != exp {
t.Errorf("%q != %q", s, exp)
}
}