File tree Expand file tree Collapse file tree 6 files changed +96
-0
lines changed
tests/testsuite/cargo_add Expand file tree Collapse file tree 6 files changed +96
-0
lines changed Original file line number Diff line number Diff line change 1+ [workspace ]
2+
3+ [package ]
4+ name = " cargo-list-test-fixture"
5+ version = " 0.0.0"
6+ edition = " 2015"
7+
8+ [dependencies ]
9+ your_face = { version = " 99999.0.0" , features = [" eyes" ] }
Original file line number Diff line number Diff line change 1+ use cargo_test_support:: compare:: assert_ui;
2+ use cargo_test_support:: current_dir;
3+ use cargo_test_support:: file;
4+ use cargo_test_support:: prelude:: * ;
5+ use cargo_test_support:: str;
6+ use cargo_test_support:: Project ;
7+
8+ #[ cargo_test]
9+ fn case ( ) {
10+ cargo_test_support:: registry:: init ( ) ;
11+ cargo_test_support:: registry:: Package :: new ( "your_face" , "99999.0.0+my-package" )
12+ . feature ( "nose" , & [ ] )
13+ . feature ( "mouth" , & [ ] )
14+ . feature ( "eyes" , & [ ] )
15+ . feature ( "ears" , & [ ] )
16+ . publish ( ) ;
17+
18+ let project = Project :: from_template ( current_dir ! ( ) . join ( "in" ) ) ;
19+ let project_root = project. root ( ) ;
20+ let cwd = & project_root;
21+
22+ snapbox:: cmd:: Command :: cargo_ui ( )
23+ . arg ( "add" )
24+ . arg_line ( "your-face" )
25+ . current_dir ( cwd)
26+ . assert ( )
27+ . success ( )
28+ . stdout_eq ( str![ "" ] )
29+ . stderr_eq ( file ! [ "stderr.term.svg" ] ) ;
30+
31+ assert_ui ( ) . subset_matches ( current_dir ! ( ) . join ( "out" ) , & project_root) ;
32+ }
Original file line number Diff line number Diff line change 1+ [workspace ]
2+
3+ [package ]
4+ name = " cargo-list-test-fixture"
5+ version = " 0.0.0"
6+ edition = " 2015"
7+
8+ [dependencies ]
9+ your_face = { version = " 99999.0.0" }
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ mod features;
2525mod features_activated_over_limit;
2626mod features_deactivated_over_limit;
2727mod features_empty;
28+ mod features_fuzzy;
2829mod features_multiple_occurrences;
2930mod features_preserve;
3031mod features_spaced_values;
You can’t perform that action at this time.
0 commit comments