mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Add test of update with version that differ only in build metadata
This commit is contained in:
parent
b48c41aedb
commit
4d1bf29a2c
@ -391,6 +391,48 @@ fn update_precise() {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn update_precise_build_metadata() {
|
||||
Package::new("serde", "0.0.1+first").publish();
|
||||
Package::new("serde", "0.0.1+second").publish();
|
||||
|
||||
let p = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
[package]
|
||||
name = "foo"
|
||||
version = "0.0.0"
|
||||
|
||||
[dependencies]
|
||||
serde = "0.0.1"
|
||||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.build();
|
||||
|
||||
p.cargo("generate-lockfile").run();
|
||||
p.cargo("update serde --precise 0.0.1+first").run();
|
||||
|
||||
p.cargo("update serde --precise 0.0.1+second")
|
||||
.with_stderr(
|
||||
"\
|
||||
[UPDATING] `[..]` index
|
||||
[UPDATING] serde v0.0.1+first -> v0.0.1+second
|
||||
",
|
||||
)
|
||||
.run();
|
||||
|
||||
p.cargo("update serde --precise 0.0.1+first")
|
||||
.with_stderr(
|
||||
"\
|
||||
[UPDATING] `[..]` index
|
||||
[DOWNGRADING] serde v0.0.1+second -> v0.0.1+first
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn update_precise_do_not_force_update_deps() {
|
||||
Package::new("log", "0.1.0").publish();
|
||||
|
Loading…
x
Reference in New Issue
Block a user