@@ -488,3 +488,25 @@ func TestInstallLibraryWithDependencies(t *testing.T) {
488
488
_ , _ , err = cli .Run ("lib" , "install" , "Arduino_Builtin" , "--no-overwrite" )
489
489
require .Error (t , err )
490
490
}
491
+
492
+ func TestInstallNoDeps (t * testing.T ) {
493
+ env , cli := integrationtest .CreateArduinoCLIWithEnvironment (t )
494
+ defer env .CleanUp ()
495
+
496
+ _ , _ , err := cli .Run ("update" )
497
+ require .NoError (t , err )
498
+
499
+ // Verifies libraries are not installed
500
+ stdout , _ , err := cli .Run ("lib" , "list" , "--format" , "json" )
501
+ require .NoError (t , err )
502
+ requirejson .Empty (t , stdout )
503
+
504
+ // Install library skipping dependencies installation
505
+ _ ,
_ ,
err = cli .
Run (
"lib" ,
"install" ,
"[email protected] " ,
"--no-deps" )
506
+ require .NoError (t , err )
507
+
508
+ // Verifies library's dependencies are not installed
509
+ stdout , _ , err = cli .Run ("lib" , "list" , "--format" , "json" )
510
+ require .NoError (t , err )
511
+ requirejson .Query (t , stdout , ".[] | .library | .name" , "\" MD_Parola\" " )
512
+ }
0 commit comments