File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
tests/testsuite/cargo_tree/dupe Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use crate::prelude::*;
22use cargo_test_support:: file;
33use cargo_test_support:: project;
44use cargo_test_support:: registry:: Package ;
5+ use cargo_test_support:: str;
56
67#[ cargo_test]
78fn case ( ) {
@@ -34,3 +35,33 @@ fn case() {
3435 . stdout_eq ( file ! [ "stdout.term.svg" ] )
3536 . stderr_eq ( file ! [ "stderr.term.svg" ] ) ;
3637}
38+
39+ #[ cargo_test]
40+ fn all_flag ( ) {
41+ Package :: new ( "a" , "1.0.0" ) . dep ( "b" , "1.0" ) . publish ( ) ;
42+ Package :: new ( "b" , "1.0.0" ) . dep ( "c" , "1.0" ) . publish ( ) ;
43+ Package :: new ( "c" , "1.0.0" ) . publish ( ) ;
44+
45+ let p = project ( )
46+ . file (
47+ "Cargo.toml" ,
48+ r#"
49+ [package]
50+ name = "foo"
51+ version = "0.1.0"
52+
53+ [dependencies]
54+ a = "1.0"
55+ b = "1.0"
56+ "# ,
57+ )
58+ . file ( "src/lib.rs" , "" )
59+ . file ( "build.rs" , "fn main() {}" )
60+ . build ( ) ;
61+
62+ p. cargo ( "tree --all" ) . with_stderr_data ( str![ [ r#"
63+ [WARNING] The `cargo tree` --all flag has been changed to --no-dedupe, and may be removed in a future version.
64+ If you are looking to display all workspace members, use the --workspace flag.
65+ ...
66+ "# ] ] ) . run ( ) ;
67+ }
You can’t perform that action at this time.
0 commit comments