Skip to content

Commit 77f54cc

Browse files
committed
test(add): add test to show current behaviour of cargo install when @ symbol is missing for the version
1 parent ee85ada commit 77f54cc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/testsuite/install.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,19 @@ fn bad_version() {
396396
.run();
397397
}
398398

399+
#[cargo_test]
400+
fn missing_at_symbol_before_version() {
401+
pkg("foo", "0.0.1");
402+
cargo_process("install foo=0.2.0")
403+
.with_status(101)
404+
.with_stderr_data(str![[r#"
405+
[UPDATING] `dummy-registry` index
406+
[ERROR] could not find `foo=0.2.0` in registry `crates-io` with version `*`
407+
408+
"#]])
409+
.run();
410+
}
411+
399412
#[cargo_test]
400413
fn bad_paths() {
401414
cargo_process("install")

0 commit comments

Comments
 (0)