From 31ea0d93f7233ee0096e605b42c58bf10ec10c22 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 8 Mar 2018 21:48:38 +0300 Subject: [PATCH] Fix some trivially fixable tests --- tests/testsuite/build.rs | 13 ++++++++++--- tests/testsuite/check.rs | 2 -- tests/testsuite/init.rs | 10 +++++----- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 6a7631f99..e530ec297 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -3242,7 +3242,6 @@ fn compiler_json_error_format() { } #[test] -#[ignore] fn wrong_message_format_option() { let p = project("foo") .file("Cargo.toml", &basic_bin_manifest("foo")) @@ -3251,8 +3250,16 @@ fn wrong_message_format_option() { assert_that(p.cargo("build").arg("--message-format").arg("XML"), execs().with_status(1) - .with_stderr_contains( -r#"[ERROR] Could not match 'xml' with any of the allowed variants: ["Human", "Json"]"#)); + .with_stderr("\ +error: 'XML' isn't a valid value for '--message-format ' +[possible values: human, json] + + +USAGE: + cargo build --message-format + +For more information try --help +")); } #[test] diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index 53e9407b3..38b7d214c 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -331,7 +331,6 @@ fn dylib_check_preserves_build_cache() { // test `cargo rustc --profile check` #[test] -#[ignore] fn rustc_check() { let foo = project("foo") .file("Cargo.toml", r#" @@ -371,7 +370,6 @@ fn rustc_check() { } #[test] -#[ignore] fn rustc_check_err() { let foo = project("foo") .file("Cargo.toml", r#" diff --git a/tests/testsuite/init.rs b/tests/testsuite/init.rs index 0c521e7bf..f80aedf52 100644 --- a/tests/testsuite/init.rs +++ b/tests/testsuite/init.rs @@ -440,16 +440,16 @@ fn with_argument() { #[test] -#[ignore] fn unknown_flags() { assert_that(cargo_process("init").arg("foo").arg("--flag"), execs().with_status(1) .with_stderr("\ -[ERROR] Unknown flag: '--flag' +error: Found argument '--flag' which wasn't expected, or isn't valid in this context -Usage: - cargo init [options] [] - cargo init -h | --help +USAGE: + cargo init [OPTIONS] [--] [path] + +For more information try --help ")); } -- 2.30.2