summaryrefslogtreecommitdiffstats
path: root/colorschemes/registry_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'colorschemes/registry_test.go')
-rw-r--r--colorschemes/registry_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/colorschemes/registry_test.go b/colorschemes/registry_test.go
new file mode 100644
index 0000000..e4216ab
--- /dev/null
+++ b/colorschemes/registry_test.go
@@ -0,0 +1,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.")
+ }
+ }
+}