mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Drop niche Execs::with_no_expected_status
.. by gating the nightly-only tests.
This commit is contained in:
parent
60828dba83
commit
b1d6a7e11d
@ -4361,6 +4361,9 @@ fn inferred_benchmarks() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn target_edition() {
|
fn target_edition() {
|
||||||
|
if !is_nightly() { // --edition is nightly-only
|
||||||
|
return;
|
||||||
|
}
|
||||||
let p = project()
|
let p = project()
|
||||||
.file(
|
.file(
|
||||||
"Cargo.toml",
|
"Cargo.toml",
|
||||||
@ -4380,7 +4383,6 @@ fn target_edition() {
|
|||||||
assert_that(
|
assert_that(
|
||||||
p.cargo("build").arg("-v").masquerade_as_nightly_cargo(),
|
p.cargo("build").arg("-v").masquerade_as_nightly_cargo(),
|
||||||
execs()
|
execs()
|
||||||
.with_no_expected_status() // passes on nightly, fails on stable, b/c --edition is nightly-only
|
|
||||||
.with_stderr_contains("\
|
.with_stderr_contains("\
|
||||||
[COMPILING] foo v0.0.1 ([..])
|
[COMPILING] foo v0.0.1 ([..])
|
||||||
[RUNNING] `rustc [..]--edition=2018 [..]
|
[RUNNING] `rustc [..]--edition=2018 [..]
|
||||||
|
@ -5,7 +5,7 @@ use std::path::{Path, PathBuf};
|
|||||||
|
|
||||||
use git2;
|
use git2;
|
||||||
use support::{cargo_process, sleep_ms, ChannelChanger};
|
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 support::registry::Package;
|
||||||
use flate2::read::GzDecoder;
|
use flate2::read::GzDecoder;
|
||||||
use support::hamcrest::{assert_that, contains, existing_file};
|
use support::hamcrest::{assert_that, contains, existing_file};
|
||||||
@ -934,6 +934,9 @@ fn package_two_kinds_of_deps() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_edition() {
|
fn test_edition() {
|
||||||
|
if !is_nightly() { // --edition is nightly-only
|
||||||
|
return;
|
||||||
|
}
|
||||||
let p = project()
|
let p = project()
|
||||||
.file(
|
.file(
|
||||||
"Cargo.toml",
|
"Cargo.toml",
|
||||||
@ -982,7 +985,6 @@ fn test_edition_missing() {
|
|||||||
assert_that(
|
assert_that(
|
||||||
p.cargo("build").arg("-v").masquerade_as_nightly_cargo(),
|
p.cargo("build").arg("-v").masquerade_as_nightly_cargo(),
|
||||||
execs()
|
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
|
// --edition is still in flux and we're not passing -Zunstable-options
|
||||||
// from Cargo so it will probably error. Only partially match the output
|
// from Cargo so it will probably error. Only partially match the output
|
||||||
// until stuff stabilizes
|
// until stuff stabilizes
|
||||||
|
@ -540,11 +540,6 @@ impl Execs {
|
|||||||
self
|
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
|
/// Verify that stdout contains the given contiguous lines somewhere in
|
||||||
/// its output.
|
/// its output.
|
||||||
/// See `lines_match` for supported patterns.
|
/// See `lines_match` for supported patterns.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user