1
0
mirror of https://github.com/gizak/termui.git synced 2025-04-29 13:48:51 +08:00
termui/par_test.go

21 lines
363 B
Go
Raw Normal View History

package termui
import "testing"
func TestPar_NoBorderBackground(t *testing.T) {
par := NewPar("a")
2015-10-22 11:17:20 -04:00
par.Border = false
par.Bg = ColorBlue
par.TextBgColor = ColorBlue
par.Width = 2
par.Height = 2
pts := par.Buffer()
2015-10-22 11:17:20 -04:00
for _, p := range pts.CellMap {
t.Log(p)
2015-10-22 11:17:20 -04:00
if p.Bg != par.Bg {
t.Errorf("expected color to be %v but got %v", par.Bg, p.Bg)
}
}
}