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 (
1919 "path/filepath"
2020 "testing"
2121
22+ "github.com/arduino/go-paths-helper"
2223 "github.com/stretchr/testify/require"
2324)
2425
@@ -63,3 +64,11 @@ func TestFindConfigFile(t *testing.T) {
6364 configFile = FindConfigFlagsInArgsOrFallbackOnEnv ([]string {"--config-file" , "flag/path" })
6465 require .Equal (t , "flag/path" , configFile )
6566}
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