From: Aleksey Kladov Date: Thu, 8 Mar 2018 19:40:28 +0000 (+0300) Subject: Fix more tests by updating error messages X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~2^2~47^2~29 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6783272a8289df6921950634ac5a870747ecaaa3;p=cargo.git Fix more tests by updating error messages --- diff --git a/tests/testsuite/new.rs b/tests/testsuite/new.rs index 819205ee0..ab30b2062 100644 --- a/tests/testsuite/new.rs +++ b/tests/testsuite/new.rs @@ -100,16 +100,17 @@ fn simple_git() { } #[test] -#[ignore] fn no_argument() { assert_that(cargo_process("new"), execs().with_status(1) .with_stderr("\ -[ERROR] Invalid arguments. +error: The following required arguments were not provided: + -Usage: - cargo new [options] - cargo new -h | --help +USAGE: + cargo new [OPTIONS] + +For more information try --help ")); } @@ -371,16 +372,16 @@ fn subpackage_git_with_vcs_arg() { } #[test] -#[ignore] fn unknown_flags() { assert_that(cargo_process("new").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 new [OPTIONS] -Usage: - cargo new [..] - cargo new [..] +For more information try --help ")); } diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index 6717b5703..0d123d05a 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -285,7 +285,6 @@ example } #[test] -#[ignore] fn run_bins() { let p = project("foo") .file("Cargo.toml", r#" @@ -306,7 +305,7 @@ fn run_bins() { assert_that(p.cargo("run").arg("--bins"), execs().with_status(1) .with_stderr_contains("\ -[ERROR] Unknown flag: '--bins'. Did you mean '--bin'?")); +error: Found argument '--bins' which wasn't expected, or isn't valid in this context")); } #[test]