File tree 1 file changed +13
-7
lines changed
1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 1
1
//! Tests for the `cargo fetch` command.
2
2
3
- #![ allow( deprecated) ]
4
-
5
3
use cargo_test_support:: registry:: Package ;
6
4
use cargo_test_support:: rustc_host;
7
- use cargo_test_support:: { basic_manifest, cross_compile, project} ;
5
+ use cargo_test_support:: { basic_manifest, cross_compile, project, str } ;
8
6
9
7
#[ cargo_test]
10
8
fn no_deps ( ) {
@@ -13,7 +11,7 @@ fn no_deps() {
13
11
. file ( "src/a.rs" , "" )
14
12
. build ( ) ;
15
13
16
- p. cargo ( "fetch" ) . with_stderr ( "" ) . run ( ) ;
14
+ p. cargo ( "fetch" ) . with_stderr_data ( "" ) . run ( ) ;
17
15
}
18
16
19
17
#[ cargo_test]
@@ -59,11 +57,16 @@ fn fetch_all_platform_dependencies_when_no_target_is_given() {
59
57
. build ( ) ;
60
58
61
59
p. cargo ( "fetch" )
62
- . with_stderr_contains ( "[DOWNLOADED] d1 v1.2.3 [..]" )
63
- . with_stderr_contains ( "[DOWNLOADED] d2 v0.1.2 [..]" )
60
+ . with_stderr_data ( str![ [ r#"
61
+ ...
62
+ [DOWNLOADED] d1 v1.2.3 (registry `dummy-registry`)
63
+ [DOWNLOADED] d2 v0.1.2 (registry `dummy-registry`)
64
+ ...
65
+ "# ] ] )
64
66
. run ( ) ;
65
67
}
66
68
69
+ #[ allow( deprecated) ]
67
70
#[ cargo_test]
68
71
fn fetch_platform_specific_dependencies ( ) {
69
72
if cross_compile:: disabled ( ) {
@@ -135,6 +138,9 @@ fn fetch_warning() {
135
138
. file ( "src/lib.rs" , "" )
136
139
. build ( ) ;
137
140
p. cargo ( "fetch" )
138
- . with_stderr ( "[WARNING] unused manifest key: package.misspelled" )
141
+ . with_stderr_data ( str![ [ r#"
142
+ [WARNING] unused manifest key: package.misspelled
143
+
144
+ "# ] ] )
139
145
. run ( ) ;
140
146
}
You can’t perform that action at this time.
0 commit comments