Skip to content

Commit 681597f

Browse files
committed
test(install): Added test case for prefixed v in version
1 parent 8b5c351 commit 681597f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/testsuite/install.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,3 +2899,17 @@ fn dry_run_remove_orphan() {
28992899
// Ensure server is still installed after the dry run
29002900
assert_has_installed_exe(paths::cargo_home(), "server");
29012901
}
2902+
2903+
#[cargo_test]
2904+
fn prefixed_v_in_version() {
2905+
pkg("foo", "0.0.1");
2906+
cargo_process("install foo@v0.0.1")
2907+
.with_status(1)
2908+
.with_stderr_data(str![[r#"
2909+
[ERROR] invalid value 'foo@v0.0.1' for '[CRATE[@<VER>]]...': unexpected character 'v' while parsing major version number
2910+
2911+
For more information, try '--help'.
2912+
2913+
"#]])
2914+
.run();
2915+
}

0 commit comments

Comments
 (0)