Fixes #57. Also renames files that came with a pull request such that they follow golang file naming conventions (underscores rather than dashes), mainly for consistency.
This commit is contained in:
parent
5f37965467
commit
82add48e51
|
@ -1,7 +1,7 @@
|
|||
package colorschemes
|
||||
|
||||
func init() {
|
||||
register("defaultdark", Colorscheme{
|
||||
register("default-dark", Colorscheme{
|
||||
Fg: 235,
|
||||
Bg: -1,
|
||||
|
||||
|
|
20
colorschemes/registry_test.go
Normal file
20
colorschemes/registry_test.go
Normal file
|
@ -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.")
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ package colorschemes
|
|||
// This scheme assumes the terminal already uses Solarized. Only DiskBar is
|
||||
// different between dark/light.
|
||||
func init() {
|
||||
register("solarized16dark", Colorscheme{
|
||||
register("solarized16-dark", Colorscheme{
|
||||
Fg: -1,
|
||||
Bg: -1,
|
||||
|
|
@ -3,7 +3,7 @@ package colorschemes
|
|||
// This scheme assumes the terminal already uses Solarized. Only DiskBar is
|
||||
// different between dark/light.
|
||||
func init() {
|
||||
register("solarized16light", Colorscheme{
|
||||
register("solarized16-light", Colorscheme{
|
||||
Fg: -1,
|
||||
Bg: -1,
|
||||
|
Loading…
Reference in New Issue
Block a user