File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -1846,6 +1846,64 @@ c v1.0.0
1846
1846
. run ( ) ;
1847
1847
}
1848
1848
1849
+ #[ cargo_test]
1850
+ fn depth_workspace ( ) {
1851
+ Package :: new ( "somedep" , "1.0.0" ) . publish ( ) ;
1852
+ Package :: new ( "otherdep" , "1.0.0" ) . publish ( ) ;
1853
+ let p = project ( )
1854
+ . file (
1855
+ "Cargo.toml" ,
1856
+ r#"
1857
+ [workspace]
1858
+ members = ["a", "b", "c"]
1859
+ "# ,
1860
+ )
1861
+ . file ( "a/Cargo.toml" , & basic_manifest ( "a" , "1.0.0" ) )
1862
+ . file ( "a/src/lib.rs" , "" )
1863
+ . file (
1864
+ "b/Cargo.toml" ,
1865
+ r#"
1866
+ [package]
1867
+ name = "b"
1868
+ version = "0.1.0"
1869
+
1870
+ [dependencies]
1871
+ c = { path = "../c" }
1872
+ somedep = "1"
1873
+ "# ,
1874
+ )
1875
+ . file ( "b/src/lib.rs" , "" )
1876
+ . file (
1877
+ "c/Cargo.toml" ,
1878
+ r#"
1879
+ [package]
1880
+ name = "c"
1881
+ version = "0.1.0"
1882
+
1883
+ [dependencies]
1884
+ somedep = "1"
1885
+ otherdep = "1"
1886
+ "# ,
1887
+ )
1888
+ . file ( "c/src/lib.rs" , "" )
1889
+ . build ( ) ;
1890
+
1891
+ p. cargo ( "tree" )
1892
+ . with_stdout_data ( str![ [ r#"
1893
+ a v1.0.0 ([ROOT]/foo/a)
1894
+
1895
+ b v0.1.0 ([ROOT]/foo/b)
1896
+ ├── c v0.1.0 ([ROOT]/foo/c)
1897
+ │ ├── otherdep v1.0.0
1898
+ │ └── somedep v1.0.0
1899
+ └── somedep v1.0.0
1900
+
1901
+ c v0.1.0 ([ROOT]/foo/c) (*)
1902
+
1903
+ "# ] ] )
1904
+ . run ( ) ;
1905
+ }
1906
+
1849
1907
#[ cargo_test]
1850
1908
fn prune ( ) {
1851
1909
let p = make_simple_proj ( ) ;
You can’t perform that action at this time.
0 commit comments