refactor: rename the bundled theme to Pumpkin
This commit is contained in:
@@ -22,15 +22,15 @@ func TestCustomSchemeCanBeFavoritedAndAppliedToApps(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
palette, err := os.ReadFile("schemes/base16/terebi-sunset.yaml")
|
||||
palette, err := os.ReadFile("schemes/base16/pumpkin.yaml")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
files := map[string][]byte{
|
||||
filepath.Join(data, "custom-schemes", "base16", "terebi-sunset.yaml"): palette,
|
||||
filepath.Join(home, "config.toml"): []byte("items = []\n"),
|
||||
filepath.Join(home, ".config", "herdr", "config.toml"): []byte("[server]\nport = 8080\n"),
|
||||
filepath.Join(home, "zed.json"): []byte(`{"name":"Terebi Sunset","themes":[{"name":"Terebi Sunset","appearance":"dark"}]}`),
|
||||
filepath.Join(data, "custom-schemes", "base16", "pumpkin.yaml"): palette,
|
||||
filepath.Join(home, "config.toml"): []byte("items = []\n"),
|
||||
filepath.Join(home, ".config", "herdr", "config.toml"): []byte("[server]\nport = 8080\n"),
|
||||
filepath.Join(home, "zed.json"): []byte(`{"name":"Pumpkin","themes":[{"name":"Pumpkin","appearance":"dark"}]}`),
|
||||
}
|
||||
for path, contents := range files {
|
||||
if err := os.WriteFile(path, contents, 0o644); err != nil {
|
||||
@@ -53,14 +53,14 @@ exec "$TINTY_TEST_BINARY" --data-dir "$TINTY_TEST_DATA" --config "$TINTY_TEST_CO
|
||||
t.Fatal(err)
|
||||
}
|
||||
var stdout, stderr bytes.Buffer
|
||||
if err := runCLI([]string{"favorite", "base16-terebi-sunset"}, &stdout, &stderr); err != nil {
|
||||
if err := runCLI([]string{"favorite", "base16-pumpkin"}, &stdout, &stderr); err != nil {
|
||||
t.Fatalf("custom scheme could not be favorited: %v: %s", err, stderr.String())
|
||||
}
|
||||
value, err := loadState(statePath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if value.Current != initial.Current || len(value.Catalog.FavoriteThemes) != 1 || value.Catalog.FavoriteThemes[0] != "base16-terebi-sunset" {
|
||||
if value.Current != initial.Current || len(value.Catalog.FavoriteThemes) != 1 || value.Catalog.FavoriteThemes[0] != "base16-pumpkin" {
|
||||
t.Fatalf("favorite changed the current pair or omitted the scheme: %#v", value)
|
||||
}
|
||||
before := readFile(t, statePath)
|
||||
@@ -70,7 +70,7 @@ exec "$TINTY_TEST_BINARY" --data-dir "$TINTY_TEST_DATA" --config "$TINTY_TEST_CO
|
||||
if readFile(t, statePath) != before {
|
||||
t.Fatal("invalid scheme changed saved state")
|
||||
}
|
||||
if output, err := exec.Command("tinty", "apply", "base16-terebi-sunset").CombinedOutput(); err != nil {
|
||||
if output, err := exec.Command("tinty", "apply", "base16-pumpkin").CombinedOutput(); err != nil {
|
||||
t.Fatalf("Tinty could not apply the custom scheme: %v\n%s", err, output)
|
||||
}
|
||||
if err := applyApps(filepath.Join(home, "zed.json")); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user