File tree Expand file tree Collapse file tree 5 files changed +72
-0
lines changed
tests/testsuite/cargo_add
normalize_name_registry_yanked Expand file tree Collapse file tree 5 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ mod normalize_name_path;
75
75
mod normalize_name_path_existing;
76
76
mod normalize_name_registry;
77
77
mod normalize_name_registry_existing;
78
+ mod normalize_name_registry_yanked;
78
79
mod normalize_name_workspace_dep;
79
80
mod offline_empty_cache;
80
81
mod optional;
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
+ . failure ( )
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"
You can’t perform that action at this time.
0 commit comments