@@ -102,19 +102,30 @@ def test_init_config_file_flag_with_overwrite_flag(run_command, working_dir):
102
102
assert str (config_file ) in result .stdout
103
103
104
104
105
- def test_dump (run_command , working_dir ):
105
+ def test_dump (run_command , data_dir , working_dir ):
106
106
# Create a config file first
107
107
config_file = Path (working_dir ) / "config" / "test" / "config.yaml"
108
108
assert not config_file .exists ()
109
109
result = run_command (f'config init --dest-file "{ config_file } "' )
110
110
assert result .ok
111
111
assert config_file .exists ()
112
112
113
- result = run_command (" config dump --format json" )
113
+ result = run_command (f' config dump --config-file " { config_file } " -- format json' )
114
114
assert result .ok
115
115
settings_json = json .loads (result .stdout )
116
116
assert [] == settings_json ["board_manager" ]["additional_urls" ]
117
117
118
+ result = run_command ('config init --additional-urls "https://example.com"' )
119
+ assert result .ok
120
+ config_file = Path (data_dir ) / "arduino-cli.yaml"
121
+ assert str (config_file ) in result .stdout
122
+ assert config_file .exists ()
123
+
124
+ result = run_command ("config dump --format json" )
125
+ assert result .ok
126
+ settings_json = json .loads (result .stdout )
127
+ assert ["https://example.com" ] == settings_json ["board_manager" ]["additional_urls" ]
128
+
118
129
119
130
def test_dump_with_config_file_flag (run_command , working_dir ):
120
131
# Create a config file first
0 commit comments