Skip to content

Commit b1d6a7e

Browse files
committed
Drop niche Execs::with_no_expected_status
.. by gating the nightly-only tests.
1 parent 60828db commit b1d6a7e

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

tests/testsuite/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4361,6 +4361,9 @@ fn inferred_benchmarks() {
43614361

43624362
#[test]
43634363
fn target_edition() {
4364+
if !is_nightly() { // --edition is nightly-only
4365+
return;
4366+
}
43644367
let p = project()
43654368
.file(
43664369
"Cargo.toml",
@@ -4380,7 +4383,6 @@ fn target_edition() {
43804383
assert_that(
43814384
p.cargo("build").arg("-v").masquerade_as_nightly_cargo(),
43824385
execs()
4383-
.with_no_expected_status() // passes on nightly, fails on stable, b/c --edition is nightly-only
43844386
.with_stderr_contains("\
43854387
[COMPILING] foo v0.0.1 ([..])
43864388
[RUNNING] `rustc [..]--edition=2018 [..]

tests/testsuite/package.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::path::{Path, PathBuf};
55

66
use git2;
77
use support::{cargo_process, sleep_ms, ChannelChanger};
8-
use support::{basic_manifest, execs, git, paths, project, registry, path2url};
8+
use support::{basic_manifest, execs, git, is_nightly, paths, project, registry, path2url};
99
use support::registry::Package;
1010
use flate2::read::GzDecoder;
1111
use support::hamcrest::{assert_that, contains, existing_file};
@@ -934,6 +934,9 @@ fn package_two_kinds_of_deps() {
934934

935935
#[test]
936936
fn test_edition() {
937+
if !is_nightly() { // --edition is nightly-only
938+
return;
939+
}
937940
let p = project()
938941
.file(
939942
"Cargo.toml",
@@ -982,7 +985,6 @@ fn test_edition_missing() {
982985
assert_that(
983986
p.cargo("build").arg("-v").masquerade_as_nightly_cargo(),
984987
execs()
985-
.with_no_expected_status() // passes on nightly, fails on stable, b/c --edition is nightly-only
986988
// --edition is still in flux and we're not passing -Zunstable-options
987989
// from Cargo so it will probably error. Only partially match the output
988990
// until stuff stabilizes

tests/testsuite/support/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -540,11 +540,6 @@ impl Execs {
540540
self
541541
}
542542

543-
pub fn with_no_expected_status(mut self) -> Execs {
544-
self.expect_exit_code = None;
545-
self
546-
}
547-
548543
/// Verify that stdout contains the given contiguous lines somewhere in
549544
/// its output.
550545
/// See `lines_match` for supported patterns.

0 commit comments

Comments
 (0)