Skip to content

Commit

Permalink
test: cargo install refuses to install pre-release version
Browse files Browse the repository at this point in the history
  • Loading branch information
eopb committed Sep 7, 2024
1 parent 2ddc46a commit 3b327ae
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ fn simple() {
assert_has_not_installed_exe(paths::cargo_home(), "foo");
}

#[cargo_test]
fn select_pre_release() {
pkg("foo", "0.0.1-pre.0");

cargo_process("install foo")
.with_status(101)
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[ERROR] could not find `foo` in registry `crates-io` with version `*`
"#]])
.run();

assert_has_not_installed_exe(paths::cargo_home(), "foo");
}

#[cargo_test]
fn install_the_same_version_twice() {
pkg("foo", "0.0.1");
Expand Down

0 comments on commit 3b327ae

Please sign in to comment.