}
#[test]
-#[ignore]
fn wrong_message_format_option() {
let p = project("foo")
.file("Cargo.toml", &basic_bin_manifest("foo"))
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 <FMT>'
+<tab>[possible values: human, json]
+
+
+USAGE:
+ cargo build --message-format <FMT>
+
+For more information try --help
+"));
}
#[test]
#[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] [<path>]
- cargo init -h | --help
+USAGE:
+ cargo init [OPTIONS] [--] [path]
+
+For more information try --help
"));
}