From: Aleksey Kladov Date: Thu, 8 Mar 2018 18:48:38 +0000 (+0300) Subject: Fix some trivially fixable tests X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~2^2~47^2~38 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=31ea0d93f7233ee0096e605b42c58bf10ec10c22;p=cargo.git Fix some trivially fixable tests --- 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 ")); }