@@ -1009,6 +1009,7 @@ foo v0.1.0 ([..]/foo)
10091009#[ cargo_test]
10101010fn format ( ) {
10111011 Package :: new ( "dep" , "1.0.0" ) . publish ( ) ;
1012+ Package :: new ( "other-dep" , "1.0.0" ) . publish ( ) ;
10121013
10131014 Package :: new ( "dep_that_is_awesome" , "1.0.0" )
10141015 . file (
@@ -1037,15 +1038,17 @@ fn format() {
10371038
10381039 [dependencies]
10391040 dep = {version="1.0", optional=true}
1041+ other-dep = {version="1.0", optional=true}
10401042 dep_that_is_awesome = {version="1.0", optional=true}
10411043
1044+
10421045 [features]
10431046 default = ["foo"]
10441047 foo = ["bar"]
10451048 bar = []
10461049 "# ,
10471050 )
1048- . file ( "src/lib .rs" , "" )
1051+ . file ( "src/main .rs" , "" )
10491052 . build ( ) ;
10501053
10511054 p. cargo ( "tree --format <<<{p}>>>" )
@@ -1082,20 +1085,21 @@ Caused by:
10821085 . arg ( "{p} [{f}]" )
10831086 . with_stdout (
10841087 "\
1085- foo v0.1.0 ([..]/foo) [bar,default,dep,dep_that_is_awesome,foo]
1088+ foo v0.1.0 ([..]/foo) [bar,default,dep,dep_that_is_awesome,foo,other-dep ]
10861089├── dep v1.0.0 []
1087- └── dep_that_is_awesome v1.0.0 []
1090+ ├── dep_that_is_awesome v1.0.0 []
1091+ └── other-dep v1.0.0 []
10881092" ,
10891093 )
10901094 . run ( ) ;
10911095
10921096 p. cargo ( "tree" )
1093- . arg ( "--features=dep_that_is_awesome" )
1097+ . arg ( "--features=other-dep, dep_that_is_awesome" )
10941098 . arg ( "--format={lib}" )
10951099 . with_stdout (
1096- "\
1097- foo
1098- └── awesome_dep
1100+ "
1101+ ├── awesome_dep
1102+ └── other_dep
10991103" ,
11001104 )
11011105 . run ( ) ;
0 commit comments