mirror of
https://github.com/gizak/termui.git
synced 2025-04-24 13:48:50 +08:00
adding start of style_parser_test
This commit is contained in:
parent
f976fe697a
commit
59f75021fe
16
style_parser_test.go
Normal file
16
style_parser_test.go
Normal file
@ -0,0 +1,16 @@
|
||||
package termui
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestParseStyles(t *testing.T) {
|
||||
cells := ParseStyles("test [blue](fg:blue)", NewStyle(ColorWhite))
|
||||
if cells[0].Style.Fg != 7 {
|
||||
t.Fatal("normal text fg is wrong")
|
||||
}
|
||||
if cells[5].Style.Fg != 4 {
|
||||
t.Fatal("blue text fg is wrong")
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user