]> git.proxmox.com Git - cargo.git/commitdiff
Test cleanup: remove unnecessary with_status(0)
authorDale Wijnand <dale.wijnand@gmail.com>
Mon, 4 Feb 2019 17:52:33 +0000 (18:52 +0100)
committerDale Wijnand <dale.wijnand@gmail.com>
Mon, 4 Feb 2019 17:52:33 +0000 (18:52 +0100)
tests/testsuite/build.rs
tests/testsuite/directory.rs
tests/testsuite/edition.rs
tests/testsuite/fix.rs
tests/testsuite/package.rs
tests/testsuite/registry.rs
tests/testsuite/run.rs
tests/testsuite/workspaces.rs

index bd54ab648a4d809a5547d383ff0a028a53b87444..892b7c9e27758395b4a67899627fbf56b3da43a7 100644 (file)
@@ -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();
 }
index 081e0be0e270d378bd2c57acb8cea7a8e6321029..217afa29048b3546393394e3ca1b8684cf86d3c7 100644 (file)
@@ -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 [..]
index 5c6e0db36bb6f9bcb13bcb2e28e47df7a166a717..3652318becd16d7542077074051af0cf21397266 100644 (file)
@@ -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();
 }
index 0bdcf221d76eec32040f71c84aa95a089b8dae5b..679abe0156ff0c770b2407f6e495af66e22f524e 100644 (file)
@@ -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();
 }
 
index fe2e392e9c2b2fbcae86180f7d8f3397466e3063..5ae5903cf3d253b29ca27d3353284e56dd982a62 100644 (file)
@@ -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]
index d56e714109a63e29d25126b4c87b1bfa3a312fa5..4330e1ddec0fbab8c6d63c6ff07ca3125f762397 100644 (file)
@@ -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
index 1cd07f079b8bdb91b9fef35a2758dc093b14ce3e..8a8e3388c0e269d0a708e587e465584a3727b46a 100644 (file)
@@ -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]
index 1063e9837a71990c4831bc759dbf75d90be788cf..5f176486d294f4f4c345a73d3ce7ef35bda909ef 100644 (file)
@@ -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();
 }