summaryrefslogtreecommitdiffstats
path: root/colorschemes/registry_test.go
blob: e4216ab7c454414dac3053d5c091d5b8a2f1e99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package colorschemes

import (
	"reflect"
	"testing"
)

func TestColorRegistry(t *testing.T) {
	colors := []string{"default", "default-dark", "solarized", "solarized16-dark", "solarized16-light", "monokai", "vice"}
	zeroCS := Colorscheme{}
	for _, cn := range colors {
		c, e := FromName("", cn)
		if e != nil {
			t.Errorf("unexpected error fetching built-in color %s: %s", cn, e)
		}
		if reflect.DeepEqual(c, zeroCS) {
			t.Error("expected a colorscheme, but got back a zero value.")
		}
	}
}