boot v2 progress: disks, ssh, success...
This commit is contained in:
21
colorio/colorio_test.go
Normal file
21
colorio/colorio_test.go
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user