File tree Expand file tree Collapse file tree 5 files changed +73
-0
lines changed
tests/testsuite/cargo_add Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Original file line number Diff line number Diff line change @@ -150,3 +150,4 @@ mod vers;
150150mod workspace_name;
151151mod workspace_path;
152152mod workspace_path_dev;
153+ mod yanked;
Original file line number Diff line number Diff line change 1+ ../add-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:: 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 ( "linked-hash-map" , "0.5.0" ) . publish ( ) ;
12+ cargo_test_support:: registry:: Package :: new ( "linked-hash-map" , "0.5.4" ) . publish ( ) ;
13+ cargo_test_support:: registry:: Package :: new ( "linked-hash-map" , "0.6.0" )
14+ . yanked ( true )
15+ . publish ( ) ;
16+
17+ let project = Project :: from_template ( current_dir ! ( ) . join ( "in" ) ) ;
18+ let project_root = project. root ( ) ;
19+ let cwd = & project_root;
20+
21+ snapbox:: cmd:: Command :: cargo_ui ( )
22+ . arg ( "add" )
23+ . arg_line ( "linked-hash-map" )
24+ . current_dir ( cwd)
25+ . assert ( )
26+ . success ( )
27+ . stdout_eq ( str![ "" ] )
28+ . stderr_eq ( file ! [ "stderr.term.svg" ] ) ;
29+
30+ assert_ui ( ) . subset_matches ( current_dir ! ( ) . join ( "out" ) , & project_root) ;
31+ }
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+ linked-hash-map = " 0.5.4"
You can’t perform that action at this time.
0 commit comments