@@ -1756,3 +1756,41 @@ func TestDependencyResolverNoOverwrite(t *testing.T) {
1756
1756
_ ,
_ ,
err = cli .
Run (
"lib" ,
"install" ,
"[email protected] " ,
"--no-overwrite" )
1757
1757
require .NoError (t , err )
1758
1758
}
1759
+
1760
+ func TestLibListContainsDependenciesField (t * testing.T ) {
1761
+ env , cli := integrationtest .CreateArduinoCLIWithEnvironment (t )
1762
+ defer env .CleanUp ()
1763
+
1764
+ _ , _ , err := cli .Run ("lib" , "update-index" )
1765
+ require .NoError (t , err )
1766
+
1767
+ _ ,
_ ,
err = cli .
Run (
"lib" ,
"install" ,
"[email protected] " )
1768
+ require .NoError (t , err )
1769
+ stdOut , _ , err := cli .Run ("lib" , "list" , "--json" )
1770
+ require .NoError (t , err )
1771
+ requirejson .Contains (t , stdOut , `{"installed_libraries": [ { "library": {
1772
+ "name":"Arduino_ConnectionHandler",
1773
+ "version": "0.6.6",
1774
+ "dependencies": [
1775
+ {"name": "Arduino_DebugUtils"},
1776
+ {"name": "WiFi101"},
1777
+ {"name": "WiFiNINA"},
1778
+ {"name": "MKRGSM"},
1779
+ {"name": "MKRNB"},
1780
+ {"name": "MKRWAN"}
1781
+ ]
1782
+ } } ]}` )
1783
+
1784
+ _ ,
_ ,
err = cli .
Run (
"lib" ,
"install" ,
"[email protected] " )
1785
+ require .NoError (t , err )
1786
+ stdOut , _ , err = cli .Run ("lib" , "list" , "--json" )
1787
+ require .NoError (t , err )
1788
+ requirejson .Contains (t , stdOut , `{"installed_libraries": [ { "library": {
1789
+ "name":"DebugLog",
1790
+ "version": "0.8.4",
1791
+ "dependencies": [
1792
+ {"name": "ArxContainer", "version_constraint": ">=0.6.0"},
1793
+ {"name": "ArxTypeTraits"}
1794
+ ]
1795
+ } } ]}` )
1796
+ }
0 commit comments