Skip to content

Commit dffd6f3

Browse files
committed
Added test for automatic creation of data dir
See #6
1 parent 2fa46ed commit dffd6f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

commands/commands_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ func makeTempDataDir(t *testing.T) func() {
118118
os.Setenv("ARDUINO_DATA_DIR", tmp.String())
119119
currDataDir = tmp
120120
fmt.Printf("ARDUINO_DATA_DIR = %s\n", os.Getenv("ARDUINO_DATA_DIR"))
121+
122+
err = tmp.RemoveAll() // To test if the data dir is automatically created
123+
require.NoError(t, err)
124+
121125
return func() {
122126
os.Unsetenv("ARDUINO_DATA_DIR")
123127
currDataDir = nil

0 commit comments

Comments
 (0)