diff --git a/tests/testsuite/clean.rs b/tests/testsuite/clean.rs index 7caf4f35e6a6..d5d76fe41dcb 100644 --- a/tests/testsuite/clean.rs +++ b/tests/testsuite/clean.rs @@ -1,5 +1,6 @@ //! Tests for the `cargo clean` command. +use cargo_test_support::compare::assert_e2e; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; @@ -824,7 +825,6 @@ fn clean_spec_reserved() { .run(); } -#[expect(deprecated)] #[cargo_test] fn clean_dry_run() { // Basic `clean --dry-run` test. @@ -866,11 +866,18 @@ fn clean_dry_run() { // Verify it didn't delete anything. let after = p.build_dir().ls_r(); assert_eq!(before, after); - let expected = itertools::join(before.iter().map(|p| p.to_str().unwrap()), "\n"); + let assert = assert_e2e(); + let mut expected = itertools::join( + before + .iter() + .map(|p| assert.redactions().redact(p.to_str().unwrap())), + "\n", + ); + expected.push_str("\n"); eprintln!("{expected}"); // Verify the verbose output. p.cargo("clean --dry-run -v") - .with_stdout_unordered(expected) + .with_stdout_data(expected.unordered()) .with_stderr_data(str![[r#" [SUMMARY] [FILE_NUM] files, [FILE_SIZE]B total [WARNING] no files deleted due to --dry-run