]> git.proxmox.com Git - cargo.git/commitdiff
Drop niche Execs::with_no_expected_status
authorDale Wijnand <dale.wijnand@gmail.com>
Thu, 2 Aug 2018 13:57:19 +0000 (14:57 +0100)
committerDale Wijnand <dale.wijnand@gmail.com>
Fri, 3 Aug 2018 06:54:07 +0000 (07:54 +0100)
.. by gating the nightly-only tests.

tests/testsuite/build.rs
tests/testsuite/package.rs
tests/testsuite/support/mod.rs

index 99b7e6d6949ad7ce15cc973315eceb18eaa231b8..e9f5ce9cc65ae6f63340e20eeed35538cd8161bb 100644 (file)
@@ -4361,6 +4361,9 @@ fn inferred_benchmarks() {
 
 #[test]
 fn target_edition() {
+    if !is_nightly() { // --edition is nightly-only
+        return;
+    }
     let p = project()
         .file(
             "Cargo.toml",
@@ -4380,7 +4383,6 @@ fn target_edition() {
     assert_that(
         p.cargo("build").arg("-v").masquerade_as_nightly_cargo(),
         execs()
-            .with_no_expected_status() // passes on nightly, fails on stable, b/c --edition is nightly-only
             .with_stderr_contains("\
 [COMPILING] foo v0.0.1 ([..])
 [RUNNING] `rustc [..]--edition=2018 [..]
index 4ae6f8f6fb99dcaabef9204074b616967fd7fb47..d4ed25415f2a993cb5da2f4e7f8ec33c3a67ee67 100644 (file)
@@ -5,7 +5,7 @@ use std::path::{Path, PathBuf};
 
 use git2;
 use support::{cargo_process, sleep_ms, ChannelChanger};
-use support::{basic_manifest, execs, git, paths, project, registry, path2url};
+use support::{basic_manifest, execs, git, is_nightly, paths, project, registry, path2url};
 use support::registry::Package;
 use flate2::read::GzDecoder;
 use support::hamcrest::{assert_that, contains, existing_file};
@@ -934,6 +934,9 @@ fn package_two_kinds_of_deps() {
 
 #[test]
 fn test_edition() {
+    if !is_nightly() { // --edition is nightly-only
+        return;
+    }
     let p = project()
         .file(
             "Cargo.toml",
@@ -982,7 +985,6 @@ fn test_edition_missing() {
     assert_that(
         p.cargo("build").arg("-v").masquerade_as_nightly_cargo(),
         execs()
-            .with_no_expected_status() // passes on nightly, fails on stable, b/c --edition is nightly-only
                 // --edition is still in flux and we're not passing -Zunstable-options
                 // from Cargo so it will probably error. Only partially match the output
                 // until stuff stabilizes
index 8b7198b5b8d529f3ea539ab2f3deae643a07e5a7..602e4f8a9e27a36d71e80356ed17f76f1a468919 100644 (file)
@@ -540,11 +540,6 @@ impl Execs {
         self
     }
 
-    pub fn with_no_expected_status(mut self) -> Execs {
-        self.expect_exit_code = None;
-        self
-    }
-
     /// Verify that stdout contains the given contiguous lines somewhere in
     /// its output.
     /// See `lines_match` for supported patterns.