}
#[test]
-#[ignore]
fn not_both_vers_and_version() {
pkg("foo", "0.1.1");
pkg("foo", "0.1.2");
assert_that(cargo_process("install").arg("foo").arg("--version").arg("0.1.1").arg("--vers").arg("0.1.2"),
- execs().with_status(101).with_stderr_contains("\
-error: invalid arguments
+ execs().with_status(1).with_stderr_contains("\
+error: The argument '--version <VERSION>' was provided more than once, \
+but cannot be used multiple times
"));
}
}
#[test]
-#[ignore]
fn cargo_metadata_bad_version() {
let p = project("foo")
.file("Cargo.toml", &basic_bin_manifest("foo"))
assert_that(p.cargo("metadata").arg("--no-deps")
.arg("--format-version").arg("2")
.cwd(p.root()),
- execs().with_status(101)
- .with_stderr("[ERROR] metadata version 2 not supported, only 1 is currently supported"));
+ execs().with_status(1)
+ .with_stderr("\
+error: '2' isn't a valid value for '--format-version <VERSION>'
+<tab>[possible values: 1]
+
+
+USAGE:
+ cargo metadata --format-version <VERSION> --no-deps
+
+For more information try --help"));
}
#[test]
}
#[test]
-#[ignore]
fn run_multiple_packages() {
let p = project("foo")
.file("foo/Cargo.toml", r#"
assert_that(cargo().arg("-p").arg("d1").arg("-p").arg("d2"),
execs()
.with_status(1)
- .with_stderr_contains("[ERROR] Invalid arguments."));
+ .with_stderr("\
+error: The argument '--package <SPEC>' was provided more than once, but cannot be used multiple times
+
+USAGE:
+ cargo run --message-format <FMT> --package <SPEC>
+
+For more information try --help"));
assert_that(cargo().arg("-p").arg("d3"),
execs()
}
#[test]
-#[ignore]
fn fail_with_multiple_packages() {
let foo = project("foo")
.file("Cargo.toml", r#"
assert_that(foo.cargo("rustc").arg("-v").arg("-p").arg("bar")
.arg("-p").arg("baz"),
execs().with_status(1).with_stderr("\
-[ERROR] Invalid arguments.
+error: The argument '--package <SPEC>' was provided more than once, \
+ but cannot be used multiple times
-Usage:
- cargo rustc [options] [--] [<opts>...]"));
+USAGE:
+ cargo rustc --message-format <FMT> --package <SPEC> --verbose
+
+For more information try --help"));
}
#[test]