add tests for additional font modifiers

This commit is contained in:
Carson McManus 2020-11-16 00:49:21 -05:00
parent eea25385e4
commit 4946857fbd
2 changed files with 17 additions and 0 deletions

View File

@ -310,6 +310,21 @@ func TestCellOptsToStyle(t *testing.T) {
opts: cell.Options{Underline: true},
want: tcell.StyleDefault.Underline(true),
},
{
colorMode: terminalapi.ColorModeNormal,
opts: cell.Options{Strikethrough: true},
want: tcell.StyleDefault.StrikeThrough(true),
},
{
colorMode: terminalapi.ColorModeNormal,
opts: cell.Options{Inverse: true},
want: tcell.StyleDefault.Reverse(true),
},
{
colorMode: terminalapi.ColorModeNormal,
opts: cell.Options{Blink: true},
want: tcell.StyleDefault.Blink(true),
},
}
for _, tc := range tests {

View File

@ -60,6 +60,8 @@ func TestCellFontModifier(t *testing.T) {
{cell.Options{Underline: true}, tbx.AttrUnderline, false},
{cell.Options{Italic: true}, 0, true},
{cell.Options{Strikethrough: true}, 0, true},
{cell.Options{Inverse: true}, tbx.AttrReverse, true},
{cell.Options{Blink: true}, 0, true},
}
for _, tc := range tests {