Skip to content

Commit

Permalink
Auto merge of #14080 - henry40408:issue-14039-minimal-versions, r=wei…
Browse files Browse the repository at this point in the history
…hanglo

test: migrate minimal_versions to snapbox

### What does this PR try to resolve?

Part of #14039.

Migrate `tests/testsuite/minimal_versions.rs` to snapbox.

### How should we test and review this PR?

N/A

### Additional information

N/A
  • Loading branch information
bors committed Jun 16, 2024
2 parents 5586a47 + 4868bf8 commit 5d357f0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/testsuite/minimal_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
//!
//! Note: Some tests are located in the resolver-tests package.
#![allow(deprecated)]

use cargo_test_support::project;
use cargo_test_support::registry::Package;
use cargo_test_support::str;

// Ensure that the "-Z minimal-versions" CLI option works and the minimal
// version of a dependency ends up in the lock file.
Expand All @@ -32,13 +31,12 @@ fn minimal_version_cli() {

p.cargo("generate-lockfile -Zminimal-versions")
.masquerade_as_nightly_cargo(&["minimal-versions"])
.with_stderr(
"\
[UPDATING] [..]
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 2 packages to earliest compatible versions
[ADDING] dep v1.0.0 (latest: v1.1.0)
",
)
"#]])
.run();

let lock = p.read_lockfile();
Expand Down

0 comments on commit 5d357f0

Please sign in to comment.