From 4946857fbd6934f604ed6791913267aebd45b849 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Mon, 16 Nov 2020 00:49:21 -0500 Subject: [PATCH] add tests for additional font modifiers --- terminal/tcell/cell_options_test.go | 15 +++++++++++++++ terminal/termbox/cell_options_test.go | 2 ++ 2 files changed, 17 insertions(+) diff --git a/terminal/tcell/cell_options_test.go b/terminal/tcell/cell_options_test.go index f39f2c7..03b9b92 100644 --- a/terminal/tcell/cell_options_test.go +++ b/terminal/tcell/cell_options_test.go @@ -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 { diff --git a/terminal/termbox/cell_options_test.go b/terminal/termbox/cell_options_test.go index 6c40426..7c76089 100644 --- a/terminal/termbox/cell_options_test.go +++ b/terminal/termbox/cell_options_test.go @@ -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 {