mirror of
https://github.com/rust-lang/cargo
synced 2024-10-13 19:22:33 +00:00
Remove useless format calls from tests
This commit is contained in:
parent
212cca9ff7
commit
40fc7c4e24
|
@ -7,7 +7,7 @@ use hamcrest::assert_that;
|
|||
#[test]
|
||||
fn net_retry_loads_from_config() {
|
||||
let p = project("foo")
|
||||
.file("Cargo.toml", &format!(r#"
|
||||
.file("Cargo.toml", r#"
|
||||
[project]
|
||||
name = "foo"
|
||||
version = "0.0.1"
|
||||
|
@ -15,7 +15,7 @@ fn net_retry_loads_from_config() {
|
|||
|
||||
[dependencies.bar]
|
||||
git = "https://127.0.0.1:11/foo/bar"
|
||||
"#))
|
||||
"#)
|
||||
.file("src/main.rs", "").file(".cargo/config", r#"
|
||||
[net]
|
||||
retry=1
|
||||
|
@ -25,14 +25,14 @@ fn net_retry_loads_from_config() {
|
|||
|
||||
assert_that(p.cargo_process("build").arg("-v"),
|
||||
execs().with_status(101)
|
||||
.with_stderr_contains(&format!("[WARNING] spurious network error \
|
||||
(1 tries remaining): [2/-1] [..]")));
|
||||
.with_stderr_contains("[WARNING] spurious network error \
|
||||
(1 tries remaining): [2/-1] [..]"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn net_retry_git_outputs_warning() {
|
||||
let p = project("foo")
|
||||
.file("Cargo.toml", &format!(r#"
|
||||
.file("Cargo.toml", r#"
|
||||
[project]
|
||||
name = "foo"
|
||||
version = "0.0.1"
|
||||
|
@ -40,7 +40,7 @@ fn net_retry_git_outputs_warning() {
|
|||
|
||||
[dependencies.bar]
|
||||
git = "https://127.0.0.1:11/foo/bar"
|
||||
"#))
|
||||
"#)
|
||||
.file(".cargo/config", r#"
|
||||
[http]
|
||||
timeout=1
|
||||
|
@ -49,8 +49,8 @@ fn net_retry_git_outputs_warning() {
|
|||
|
||||
assert_that(p.cargo_process("build").arg("-v").arg("-j").arg("1"),
|
||||
execs().with_status(101)
|
||||
.with_stderr_contains(&format!("[WARNING] spurious network error \
|
||||
(2 tries remaining): [2/-1] [..]"))
|
||||
.with_stderr_contains(&format!("\
|
||||
[WARNING] spurious network error (1 tries remaining): [2/-1] [..]")));
|
||||
.with_stderr_contains("[WARNING] spurious network error \
|
||||
(2 tries remaining): [2/-1] [..]")
|
||||
.with_stderr_contains("\
|
||||
[WARNING] spurious network error (1 tries remaining): [2/-1] [..]"));
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ http://doc.crates.io/manifest.html#package-metadata for more info.
|
|||
dir = p.url())));
|
||||
|
||||
let p = project("all")
|
||||
.file("Cargo.toml", &format!(r#"
|
||||
.file("Cargo.toml", r#"
|
||||
[project]
|
||||
name = "foo"
|
||||
version = "0.0.1"
|
||||
|
@ -116,7 +116,7 @@ http://doc.crates.io/manifest.html#package-metadata for more info.
|
|||
license = "MIT"
|
||||
description = "foo"
|
||||
repository = "bar"
|
||||
"#))
|
||||
"#)
|
||||
.file("src/main.rs", r#"
|
||||
fn main() {}
|
||||
"#);
|
||||
|
|
|
@ -2115,9 +2115,9 @@ fn only_test_docs() {
|
|||
|
||||
assert_that(p.cargo("test").arg("--doc"),
|
||||
execs().with_status(0)
|
||||
.with_stderr(&format!("\
|
||||
.with_stderr("\
|
||||
[COMPILING] foo v0.0.1 ([..])
|
||||
[DOCTEST] foo"))
|
||||
[DOCTEST] foo")
|
||||
.with_stdout("
|
||||
running 1 test
|
||||
test bar_0 ... ok
|
||||
|
|
Loading…
Reference in a new issue