mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Test cleanup: remove unnecessary with_status(0)
This commit is contained in:
parent
0dbb2fc15f
commit
37df042ba8
@ -4628,13 +4628,11 @@ Did you mean `ex1`?",
|
||||
.run();
|
||||
|
||||
ws.cargo("build -v --lib")
|
||||
.with_status(0)
|
||||
.with_stderr_contains("[RUNNING] `rustc [..]a/src/lib.rs[..]")
|
||||
.with_stderr_contains("[RUNNING] `rustc [..]b/src/lib.rs[..]")
|
||||
.run();
|
||||
|
||||
ws.cargo("build -v --example ex1")
|
||||
.with_status(0)
|
||||
.with_stderr_contains("[RUNNING] `rustc [..]a/examples/ex1.rs[..]")
|
||||
.run();
|
||||
}
|
||||
|
@ -713,7 +713,6 @@ fn workspace_different_locations() {
|
||||
p.cargo("build").cwd(p.root().join("foo")).run();
|
||||
p.cargo("build")
|
||||
.cwd(p.root().join("bar"))
|
||||
.with_status(0)
|
||||
.with_stderr(
|
||||
"\
|
||||
[COMPILING] bar [..]
|
||||
|
@ -32,8 +32,5 @@ fn edition_works_for_build_script() {
|
||||
.file("a/src/lib.rs", "pub fn foo() {}")
|
||||
.build();
|
||||
|
||||
p.cargo("build -v")
|
||||
.masquerade_as_nightly_cargo()
|
||||
.with_status(0)
|
||||
.run();
|
||||
p.cargo("build -v").masquerade_as_nightly_cargo().run();
|
||||
}
|
||||
|
@ -943,7 +943,6 @@ fn fix_idioms() {
|
||||
";
|
||||
p.cargo("fix --edition-idioms --allow-no-vcs")
|
||||
.with_stderr(stderr)
|
||||
.with_status(0)
|
||||
.run();
|
||||
|
||||
assert!(p.read_file("src/lib.rs").contains("Box<dyn Any>"));
|
||||
@ -955,7 +954,6 @@ fn idioms_2015_ok() {
|
||||
|
||||
p.cargo("fix --edition-idioms --allow-no-vcs")
|
||||
.masquerade_as_nightly_cargo()
|
||||
.with_status(0)
|
||||
.run();
|
||||
}
|
||||
|
||||
|
@ -1263,10 +1263,7 @@ fn package_with_select_features() {
|
||||
)
|
||||
.build();
|
||||
|
||||
p.cargo("package --features required")
|
||||
.masquerade_as_nightly_cargo()
|
||||
.with_status(0)
|
||||
.run();
|
||||
p.cargo("package --features required").masquerade_as_nightly_cargo().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -1295,10 +1292,7 @@ fn package_with_all_features() {
|
||||
)
|
||||
.build();
|
||||
|
||||
p.cargo("package --all-features")
|
||||
.masquerade_as_nightly_cargo()
|
||||
.with_status(0)
|
||||
.run();
|
||||
p.cargo("package --all-features").masquerade_as_nightly_cargo().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -635,7 +635,6 @@ required by package `foo v0.0.1 ([..])`
|
||||
.run();
|
||||
|
||||
p.cargo("update -p baz")
|
||||
.with_status(0)
|
||||
.with_stderr_contains(
|
||||
"\
|
||||
[UPDATING] `[..]` index
|
||||
|
@ -1098,10 +1098,7 @@ fn run_workspace() {
|
||||
available binaries: a, b",
|
||||
)
|
||||
.run();
|
||||
p.cargo("run --bin a")
|
||||
.with_status(0)
|
||||
.with_stdout("run-a")
|
||||
.run();
|
||||
p.cargo("run --bin a").with_stdout("run-a").run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -1130,11 +1127,7 @@ fn default_run_workspace() {
|
||||
.file("b/src/main.rs", r#"fn main() {println!("run-b");}"#)
|
||||
.build();
|
||||
|
||||
p.cargo("run")
|
||||
.masquerade_as_nightly_cargo()
|
||||
.with_status(0)
|
||||
.with_stdout("run-a")
|
||||
.run();
|
||||
p.cargo("run").masquerade_as_nightly_cargo().with_stdout("run-a").run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -2074,7 +2074,6 @@ fn ws_warn_unused() {
|
||||
.file("a/src/lib.rs", "")
|
||||
.build();
|
||||
p.cargo("check")
|
||||
.with_status(0)
|
||||
.with_stderr_contains(&format!(
|
||||
"\
|
||||
[WARNING] {} for the non root package will be ignored, specify {} at the workspace root:
|
||||
@ -2111,7 +2110,6 @@ fn ws_warn_path() {
|
||||
.build();
|
||||
|
||||
p.cargo("check")
|
||||
.with_status(0)
|
||||
.with_stderr_contains("[WARNING] [..]/foo/a/Cargo.toml: the cargo feature `edition`[..]")
|
||||
.run();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user