diff --git a/tests/testsuite/update.rs b/tests/testsuite/update.rs index 6151e207cdc3..f7eb0f5bb64c 100644 --- a/tests/testsuite/update.rs +++ b/tests/testsuite/update.rs @@ -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 \", 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 .