We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8749e5 commit 8fdda5aCopy full SHA for 8fdda5a
1 file changed
internal/tracking/config_test.go
@@ -1,11 +1,15 @@
1
package tracking
2
3
-import "testing"
+import (
4
+ "path/filepath"
5
+ "testing"
6
+)
7
8
func TestConfigRoundTrip(t *testing.T) {
9
// Use temp dir
10
tmpDir := t.TempDir()
- t.Setenv("XDG_CONFIG_HOME", tmpDir)
11
+ t.Setenv("HOME", tmpDir)
12
+ t.Setenv("XDG_CONFIG_HOME", filepath.Join(tmpDir, "xdg-config"))
13
14
cfg := &Config{
15
Enabled: true,
@@ -36,7 +40,8 @@ func TestConfigRoundTrip(t *testing.T) {
36
40
37
41
func TestLoadConfigMissing(t *testing.T) {
38
42
39
43
44
45
46
cfg, err := LoadConfig()
47
if err != nil {
0 commit comments