]> git.lizzy.rs Git - micro.git/blobdiff - internal/config/colorscheme_test.go
Adds options for tab bar and tab color reversing (#2480)
[micro.git] / internal / config / colorscheme_test.go
index 83080df15ad8fce874600ce5db4d76e15f737915..2785c58118fe096698bc99be7f9dd6e7a1184bae 100644 (file)
@@ -4,7 +4,7 @@ import (
        "testing"
 
        "github.com/stretchr/testify/assert"
-       "github.com/zyedidia/tcell"
+       "github.com/zyedidia/tcell/v2"
 )
 
 func TestSimpleStringToStyle(t *testing.T) {
@@ -26,6 +26,18 @@ func TestAttributeStringToStyle(t *testing.T) {
        assert.NotEqual(t, 0, attr&tcell.AttrBold)
 }
 
+func TestMultiAttributesStringToStyle(t *testing.T) {
+       s := StringToStyle("bold italic underline cyan,brightcyan")
+
+       fg, bg, attr := s.Decompose()
+
+       assert.Equal(t, tcell.ColorTeal, fg)
+       assert.Equal(t, tcell.ColorAqua, bg)
+       assert.NotEqual(t, 0, attr&tcell.AttrBold)
+       assert.NotEqual(t, 0, attr&tcell.AttrItalic)
+       assert.NotEqual(t, 0, attr&tcell.AttrUnderline)
+}
+
 func TestColor256StringToStyle(t *testing.T) {
        s := StringToStyle("128,60")