Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit fb59859

Browse files
committed
tabs are going to be the end of me
1 parent e60053e commit fb59859

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

cmd/root_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,21 @@ type testpair struct {
2020
input []string
2121
shouldError bool
2222
}
23+
24+
func TestCacheDir(t *testing.T) {
25+
tests := []struct{
26+
name string
27+
cliFlag string
28+
envVar string
29+
expectedDir string
30+
}{
31+
// your tests cases here
32+
}
33+
34+
for _, tt := range tests {
35+
t.Run(tt.name, func(t *testing.T) {
36+
// actual testing logic. probably set the env var, set the global flag based on the cliFlag, then
37+
// call getCacheDir() and make sure the return value is equal to the expectedDir
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)