File tree Expand file tree Collapse file tree 6 files changed +61
-0
lines changed
tests/testsuite/cargo_remove
optional_dep_feature_formatting Expand file tree Collapse file tree 6 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ mod multiple_dev;
20
20
mod no_arg;
21
21
mod offline;
22
22
mod optional_dep_feature;
23
+ mod optional_dep_feature_formatting;
23
24
mod optional_feature;
24
25
mod package;
25
26
mod remove_basic;
Original file line number Diff line number Diff line change
1
+ ../remove-basic.in/
Original file line number Diff line number Diff line change
1
+ use cargo_test_support:: compare:: assert_ui;
2
+ use cargo_test_support:: curr_dir;
3
+ use cargo_test_support:: CargoCommand ;
4
+ use cargo_test_support:: Project ;
5
+
6
+ #[ cargo_test]
7
+ fn case ( ) {
8
+ cargo_test_support:: registry:: init ( ) ;
9
+ cargo_test_support:: registry:: Package :: new ( "clippy" , "0.4.0+my-package" ) . publish ( ) ;
10
+ cargo_test_support:: registry:: Package :: new ( "docopt" , "0.6.2+my-package" ) . publish ( ) ;
11
+ cargo_test_support:: registry:: Package :: new ( "regex" , "0.1.1+my-package" ) . publish ( ) ;
12
+ cargo_test_support:: registry:: Package :: new ( "rustc-serialize" , "0.4.0+my-package" ) . publish ( ) ;
13
+ cargo_test_support:: registry:: Package :: new ( "toml" , "0.1.1+my-package" ) . publish ( ) ;
14
+ cargo_test_support:: registry:: Package :: new ( "semver" , "0.1.1" )
15
+ . feature ( "std" , & [ ] )
16
+ . publish ( ) ;
17
+ cargo_test_support:: registry:: Package :: new ( "serde" , "1.0.90" )
18
+ . feature ( "std" , & [ ] )
19
+ . publish ( ) ;
20
+
21
+ let project = Project :: from_template ( curr_dir ! ( ) . join ( "in" ) ) ;
22
+ let project_root = project. root ( ) ;
23
+ let cwd = & project_root;
24
+
25
+ snapbox:: cmd:: Command :: cargo_ui ( )
26
+ . arg ( "remove" )
27
+ . args ( [ "--dev" , "serde" ] )
28
+ . current_dir ( cwd)
29
+ . assert ( )
30
+ . success ( )
31
+ . stdout_matches_path ( curr_dir ! ( ) . join ( "stdout.log" ) )
32
+ . stderr_matches_path ( curr_dir ! ( ) . join ( "stderr.log" ) ) ;
33
+
34
+ assert_ui ( ) . subset_matches ( curr_dir ! ( ) . join ( "out" ) , & project_root) ;
35
+ }
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " cargo-remove-test-fixture"
3
+ version = " 0.1.0"
4
+
5
+ [[bin ]]
6
+ name = " main"
7
+ path = " src/main.rs"
8
+
9
+ [build-dependencies ]
10
+ semver = " 0.1.0"
11
+
12
+ [dependencies ]
13
+ docopt = " 0.6"
14
+ rustc-serialize = " 0.4"
15
+ semver = " 0.1"
16
+ toml = " 0.1"
17
+ clippy = " 0.4"
18
+
19
+ [dev-dependencies ]
20
+ regex = " 0.1.1"
21
+
22
+ [features ]
23
+ std = [" semver/std" ]
Original file line number Diff line number Diff line change
1
+ Removing serde from dev-dependencies
You can’t perform that action at this time.
0 commit comments