aboutsummaryrefslogtreecommitdiff
path: root/cmd/krino/commands_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/krino/commands_test.go')
-rw-r--r--cmd/krino/commands_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/krino/commands_test.go b/cmd/krino/commands_test.go
index 68a2174..2156da2 100644
--- a/cmd/krino/commands_test.go
+++ b/cmd/krino/commands_test.go
@@ -9,12 +9,14 @@ import (
"testing"
)
-// home gives each test its own HOME with an empty XDG config.
+// home gives each test its own HOME with no XDG overrides.
func home(t *testing.T) string {
t.Helper()
h := t.TempDir()
t.Setenv("HOME", h)
- t.Setenv("XDG_CONFIG_HOME", "")
+ for _, v := range []string{"XDG_CONFIG_HOME", "XDG_STATE_HOME", "XDG_DATA_HOME", "XDG_CACHE_HOME"} {
+ t.Setenv(v, "")
+ }
return h
}