@@ -262,7 +262,7 @@ func TestProfileLib(t *testing.T) {
262262 _ , _ , err = cli .Run ("profile" , "create" , sk .String (), "-m" , "uno" , "-b" , "arduino:avr:uno" , "--set-default" )
263263 require .NoError (t , err )
264264
265- out ,
_ ,
err := cli .
Run (
"profile" ,
"lib" ,
"add" ,
"[email protected] " ,
"--dest-dir " ,
sk .
String (),
"--json" )
265+ out ,
_ ,
err := cli .
Run (
"profile" ,
"lib" ,
"add" ,
"[email protected] " ,
"--sketch-path " ,
sk .
String (),
"--json" )
266266 require .NoError (t , err )
267267 requirejson .Parse (t , out ).Query (".added_libraries" ).MustContain (`
268268 [
@@ -278,7 +278,7 @@ func TestProfileLib(t *testing.T) {
278278 require .Contains (t , string (fileContent ), " - dependency: Arduino_LSM6DSOX (" )
279279
280280 t .Run ("ChangeLibVersionToDefaultProfile" , func (t * testing.T ) {
281- out ,
_ ,
err := cli .
Run (
"profile" ,
"lib" ,
"add" ,
"[email protected] " ,
"--dest-dir " ,
sk .
String (),
"--json" )
281+ out ,
_ ,
err := cli .
Run (
"profile" ,
"lib" ,
"add" ,
"[email protected] " ,
"--sketch-path " ,
sk .
String (),
"--json" )
282282 require .NoError (t , err )
283283 outjson := requirejson .Parse (t , out )
284284 outjson .Query (".added_libraries" ).MustContain (`
@@ -300,7 +300,7 @@ func TestProfileLib(t *testing.T) {
300300 })
301301
302302 t .Run ("RemoveLibFromDefaultProfile" , func (t * testing.T ) {
303- _ , _ , err = cli .Run ("profile" , "lib" , "remove" , "Arduino_Modulino" , "--dest-dir " , sk .String ())
303+ _ , _ , err = cli .Run ("profile" , "lib" , "remove" , "Arduino_Modulino" , "--sketch-path " , sk .String ())
304304 require .NoError (t , err )
305305 fileContent , err := sk .Join ("sketch.yaml" ).ReadFile ()
306306 require .NoError (t , err )
@@ -310,13 +310,13 @@ func TestProfileLib(t *testing.T) {
310310 })
311311
312312 t .Run ("AddInexistentLibToDefaultProfile" , func (t * testing.T ) {
313- _ , stderr , err := cli .Run ("profile" , "lib" , "add" , "foobar123" , "--dest-dir " , sk .String ())
313+ _ , stderr , err := cli .Run ("profile" , "lib" , "add" , "foobar123" , "--sketch-path " , sk .String ())
314314 require .Error (t , err )
315315 require .Equal (t , "Error adding foobar123: Library 'foobar123@latest' not found\n " , string (stderr ))
316316 })
317317
318318 t .Run ("RemoveLibNotInProfile" , func (t * testing.T ) {
319- _ , stderr , err := cli .Run ("profile" , "lib" , "remove" , "Arduino_JSON" , "--dest-dir " , sk .String ())
319+ _ , stderr , err := cli .Run ("profile" , "lib" , "remove" , "Arduino_JSON" , "--sketch-path " , sk .String ())
320320 require .Error (t , err )
321321 require .Equal (t , "Error removing library Arduino_JSON from the profile: could not remove library: Library 'Arduino_JSON' not found\n " , string (stderr ))
322322 })
@@ -342,14 +342,14 @@ func TestProfileLibAddRemoveFromSpecificProfile(t *testing.T) {
342342 require .NoError (t , err )
343343
344344 // Add library to a specific profile
345- _ ,
_ ,
err = cli .
Run (
"profile" ,
"lib" ,
"add" ,
"[email protected] " ,
"-m" ,
"my_profile" ,
"--dest-dir " ,
sk .
String (),
"--no-deps" )
345+ _ ,
_ ,
err = cli .
Run (
"profile" ,
"lib" ,
"add" ,
"[email protected] " ,
"-m" ,
"my_profile" ,
"--sketch-path " ,
sk .
String (),
"--no-deps" )
346346 require .NoError (t , err )
347347 fileContent , err := sk .Join ("sketch.yaml" ).ReadFile ()
348348 require .NoError (t , err )
349349 require .Contains (t , string (fileContent ), " my_profile:\n fqbn: arduino:avr:uno\n platforms:\n - platform: arduino:avr (1.8.6)\n libraries:\n - Arduino_Modulino (0.7.0)\n " )
350350
351351 // Remove library from a specific profile
352- _ , _ , err = cli .Run ("profile" , "lib" , "remove" , "Arduino_Modulino" , "-m" , "my_profile" , "--dest-dir " , sk .String ())
352+ _ , _ , err = cli .Run ("profile" , "lib" , "remove" , "Arduino_Modulino" , "-m" , "my_profile" , "--sketch-path " , sk .String ())
353353 require .NoError (t , err )
354354 fileContent , err = sk .Join ("sketch.yaml" ).ReadFile ()
355355 require .NoError (t , err )
@@ -379,15 +379,15 @@ func TestProfileSetDefault(t *testing.T) {
379379 require .NotContains (t , fileContent , "default_profile: my_profile" )
380380
381381 // Change default profile
382- _ , _ , err = cli .Run ("profile" , "set-default" , "my_profile" , "--dest-dir " , sk .String ())
382+ _ , _ , err = cli .Run ("profile" , "set-default" , "my_profile" , "--sketch-path " , sk .String ())
383383 require .NoError (t , err )
384384 fileContent , err = sk .Join ("sketch.yaml" ).ReadFileAsLines ()
385385 require .NoError (t , err )
386386 require .NotContains (t , fileContent , "default_profile: uno" )
387387 require .Contains (t , fileContent , "default_profile: my_profile" )
388388
389389 // Changing to an inexistent profile returns an error
390- _ , stderr , err := cli .Run ("profile" , "set-default" , "inexistent_profile" , "--dest-dir " , sk .String ())
390+ _ , stderr , err := cli .Run ("profile" , "set-default" , "inexistent_profile" , "--sketch-path " , sk .String ())
391391 require .Error (t , err )
392392 require .Equal (t , "Cannot set inexistent_profile as default profile: Profile 'inexistent_profile' not found\n " , string (stderr ))
393393}
0 commit comments