}
#[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:
+ <path>
-Usage:
- cargo new [options] <path>
- cargo new -h | --help
+USAGE:
+ cargo new [OPTIONS] <path>
+
+For more information try --help
"));
}
}
#[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] <path>
-Usage:
- cargo new [..]
- cargo new [..]
+For more information try --help
"));
}
}
#[test]
-#[ignore]
fn run_bins() {
let p = project("foo")
.file("Cargo.toml", r#"
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]