3
3
//! Note that these tests will generally require setting CARGO_CONTAINER_TESTS
4
4
//! or CARGO_PUBLIC_NETWORK_TESTS.
5
5
6
- #![ allow( deprecated) ]
7
-
8
6
use cargo_test_support:: containers:: Container ;
9
7
use cargo_test_support:: project;
8
+ use cargo_test_support:: str;
10
9
11
10
#[ cargo_test( container_test) ]
12
11
fn self_signed_should_fail ( ) {
@@ -43,10 +42,10 @@ fn self_signed_should_fail() {
43
42
} ;
44
43
p. cargo ( "fetch" )
45
44
. with_status ( 101 )
46
- . with_stderr ( & format ! (
45
+ . with_stderr_data ( & format ! (
47
46
"\
48
47
[UPDATING] git repository `https://127.0.0.1:[..]/repos/bar.git`
49
- error: failed to get `bar` as a dependency of package `foo v0.1.0 ([ROOT]/foo)`
48
+ [ERROR] failed to get `bar` as a dependency of package `foo v0.1.0 ([ROOT]/foo)`
50
49
51
50
Caused by:
52
51
failed to load source for dependency `bar`
@@ -55,7 +54,7 @@ Caused by:
55
54
Unable to update https://127.0.0.1:[..]/repos/bar.git
56
55
57
56
Caused by:
58
- failed to clone into: [ROOT]/home/.cargo/git/db/bar-[.. ]
57
+ failed to clone into: [ROOT]/home/.cargo/git/db/bar-[HASH ]
59
58
60
59
Caused by:
61
60
network failure seems to have happened
@@ -129,12 +128,11 @@ fn self_signed_with_cacert() {
129
128
. file ( "server.crt" , & server_crt)
130
129
. build ( ) ;
131
130
p. cargo ( "fetch" )
132
- . with_stderr (
133
- "\
131
+ . with_stderr_data ( str![ [ r#"
134
132
[UPDATING] git repository `https://127.0.0.1:[..]/repos/bar.git`
135
133
[LOCKING] 2 packages to latest compatible versions
136
- " ,
137
- )
134
+
135
+ "# ] ] )
138
136
. run ( ) ;
139
137
}
140
138
@@ -157,11 +155,10 @@ fn github_works() {
157
155
. file ( "src/lib.rs" , "" )
158
156
. build ( ) ;
159
157
p. cargo ( "fetch" )
160
- . with_stderr (
161
- "\
158
+ . with_stderr_data ( str![ [ r#"
162
159
[UPDATING] git repository `https://github.com/rust-lang/bitflags.git`
163
160
[LOCKING] 2 packages to latest compatible versions
164
- " ,
165
- )
161
+
162
+ "# ] ] )
166
163
. run ( ) ;
167
164
}
0 commit comments