File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ use std::fs::{self, File};
2
2
use std:: io:: prelude:: * ;
3
3
4
4
use cargotest:: support:: { project, execs} ;
5
+ use cargotest:: support:: registry:: Package ;
6
+ use cargotest:: ChannelChanger ;
5
7
use hamcrest:: { assert_that, existing_file, is_not} ;
6
8
7
9
#[ test]
@@ -73,7 +75,8 @@ fn adding_and_removing_packages() {
73
75
74
76
#[ test]
75
77
fn no_index_update ( ) {
76
- use cargotest:: ChannelChanger ;
78
+ Package :: new ( "serde" , "1.0.0" ) . publish ( ) ;
79
+
77
80
let p = project ( "foo" )
78
81
. file ( "Cargo.toml" , r#"
79
82
[package]
@@ -88,12 +91,12 @@ fn no_index_update() {
88
91
. build ( ) ;
89
92
90
93
assert_that ( p. cargo ( "generate-lockfile" ) ,
91
- execs ( ) . with_stdout ( "" )
92
- . with_stderr_contains ( " Updating registry `https://github.com/rust-lang/crates.io-index`" ) ) ;
94
+ execs ( ) . with_stderr ( "\
95
+ [UPDATING] registry `[..]`
96
+ " ) ) ;
93
97
94
98
assert_that ( p. cargo ( "generate-lockfile" ) . masquerade_as_nightly_cargo ( ) . arg ( "-Zno-index-update" ) ,
95
- execs ( ) . with_status ( 0 ) . with_stdout ( "" )
96
- . with_stderr_does_not_contain ( " Updating registry `https://github.com/rust-lang/crates.io-index`" ) ) ;
99
+ execs ( ) . with_status ( 0 ) . with_stdout ( "" ) . with_stderr ( "" ) ) ;
97
100
}
98
101
99
102
#[ test]
You can’t perform that action at this time.
0 commit comments