File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
internal/cli/configuration Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
19
19
"path/filepath"
20
20
"testing"
21
21
22
+ "github.com/arduino/go-paths-helper"
22
23
"github.com/stretchr/testify/require"
23
24
)
24
25
@@ -63,3 +64,11 @@ func TestFindConfigFile(t *testing.T) {
63
64
configFile = FindConfigFlagsInArgsOrFallbackOnEnv ([]string {"--config-file" , "flag/path" })
64
65
require .Equal (t , "flag/path" , configFile )
65
66
}
67
+
68
+ func TestFindConfigDir (t * testing.T ) {
69
+ // Check behaviour with --config-dir
70
+ expected , err := paths .New ("anotherpath" , "arduino-cli.yaml" ).Abs ()
71
+ require .NoError (t , err )
72
+ configFile := FindConfigFlagsInArgsOrFallbackOnEnv ([]string {"--config-dir" , "anotherpath" })
73
+ require .Equal (t , expected .String (), configFile )
74
+ }
You can’t perform that action at this time.
0 commit comments