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
f95deaafeb
commit
a58489dfbb
@ -428,6 +428,41 @@ fn update_precise_without_package() {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn update_aggressive_without_package() {
|
||||
Package::new("serde", "0.2.0").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("serde", "0.2.1").publish();
|
||||
|
||||
p.cargo("update --aggressive")
|
||||
.with_stderr(
|
||||
"\
|
||||
[WARNING] aggressive is only supported with \"--package <SPEC>\", this will become a hard error in a future release.
|
||||
[UPDATING] `[..]` index
|
||||
[UPDATING] serde v0.2.0 -> v0.2.1
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
// cargo update should respect its arguments even without a lockfile.
|
||||
// See issue "Running cargo update without a Cargo.lock ignores arguments"
|
||||
// at <https://github.com/rust-lang/cargo/issues/6872>.
|
||||
|
Loading…
x
Reference in New Issue
Block a user