1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package theme
import "testing"
func TestDetectFrom(t *testing.T) {
cases := map[string]string{
"Dark\n": "flexoki-dark",
"Dark": "flexoki-dark",
"": "flexoki-light", // macOS light mode leaves the key unset (empty output)
"Light": "flexoki-light",
}
for raw, want := range cases {
if got := detectFrom(raw); got != want {
t.Errorf("detectFrom(%q) = %q, want %q", raw, got, want)
}
}
}
|