mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Add test for aggressive update
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
1ac83ba696
commit
f0b5bdad65
@ -428,6 +428,43 @@ fn update_precise_without_package() {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn update_aggressive() {
|
||||
Package::new("log", "0.1.0").publish();
|
||||
Package::new("serde", "0.2.1").dep("log", "0.1").publish();
|
||||
|
||||
let p = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
[package]
|
||||
name = "bar"
|
||||
version = "0.0.1"
|
||||
authors = []
|
||||
|
||||
[dependencies]
|
||||
serde = "0.2"
|
||||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.build();
|
||||
|
||||
p.cargo("build").run();
|
||||
|
||||
Package::new("log", "0.1.1").publish();
|
||||
Package::new("serde", "0.2.2").dep("log", "0.1").publish();
|
||||
|
||||
p.cargo("update -p serde:0.2.1 --aggressive")
|
||||
.with_stderr(
|
||||
"\
|
||||
[UPDATING] `[..]` index
|
||||
[UPDATING] log v0.1.0 -> v0.1.1
|
||||
[UPDATING] serde v0.2.1 -> v0.2.2
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn update_aggressive_without_package() {
|
||||
Package::new("serde", "0.2.0").publish();
|
||||
|
Loading…
x
Reference in New Issue
Block a user