Skip to content

Commit

Permalink
test: migrate minimal_versions to snapbox
Browse files Browse the repository at this point in the history
  • Loading branch information
henry40408 committed Jun 16, 2024
1 parent 5586a47 commit 4868bf8
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 4868bf8

Please sign in to comment.