use std::io::prelude::*;
use cargotest::support::{project, execs};
+use cargotest::support::registry::Package;
+use cargotest::ChannelChanger;
use hamcrest::{assert_that, existing_file, is_not};
#[test]
#[test]
fn no_index_update() {
- use cargotest::ChannelChanger;
+ Package::new("serde", "1.0.0").publish();
+
let p = project("foo")
.file("Cargo.toml", r#"
[package]
.build();
assert_that(p.cargo("generate-lockfile"),
- execs().with_stdout("")
- .with_stderr_contains(" Updating registry `https://github.com/rust-lang/crates.io-index`"));
+ execs().with_stderr("\
+[UPDATING] registry `[..]`
+"));
assert_that(p.cargo("generate-lockfile").masquerade_as_nightly_cargo().arg("-Zno-index-update"),
- execs().with_status(0).with_stdout("")
- .with_stderr_does_not_contain(" Updating registry `https://github.com/rust-lang/crates.io-index`"));
+ execs().with_status(0).with_stdout("").with_stderr(""));
}
#[test]