From 4868bf82abdf77d1ad9a4260d6a96478f6cd8fc5 Mon Sep 17 00:00:00 2001 From: Heng-Yi Wu <2316687+henry40408@users.noreply.github.com> Date: Sun, 16 Jun 2024 11:19:16 +0800 Subject: [PATCH] test: migrate minimal_versions to snapbox --- tests/testsuite/minimal_versions.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/testsuite/minimal_versions.rs b/tests/testsuite/minimal_versions.rs index dc6fe9cd54f..17f495c53ec 100644 --- a/tests/testsuite/minimal_versions.rs +++ b/tests/testsuite/minimal_versions.rs @@ -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. @@ -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();