Skip to content

Commit 9909069

Browse files
committed
test(clean): Update remaining unordered test to snapbox
1 parent 2fcc375 commit 9909069

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/testsuite/clean.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Tests for the `cargo clean` command.
22
3+
use cargo_test_support::compare::assert_e2e;
34
use cargo_test_support::prelude::*;
45
use cargo_test_support::registry::Package;
56
use cargo_test_support::str;
@@ -824,7 +825,6 @@ fn clean_spec_reserved() {
824825
.run();
825826
}
826827

827-
#[expect(deprecated)]
828828
#[cargo_test]
829829
fn clean_dry_run() {
830830
// Basic `clean --dry-run` test.
@@ -866,11 +866,14 @@ fn clean_dry_run() {
866866
// Verify it didn't delete anything.
867867
let after = p.build_dir().ls_r();
868868
assert_eq!(before, after);
869-
let expected = itertools::join(before.iter().map(|p| p.to_str().unwrap()), "\n");
869+
let mut expected = itertools::join(before.iter().map(|p| p.to_str().unwrap()), "\n");
870+
expected.push_str("\n");
871+
let expected = snapbox::filter::normalize_paths(&expected);
872+
let expected = assert_e2e().redactions().redact(&expected);
870873
eprintln!("{expected}");
871874
// Verify the verbose output.
872875
p.cargo("clean --dry-run -v")
873-
.with_stdout_unordered(expected)
876+
.with_stdout_data(expected.unordered())
874877
.with_stderr_data(str![[r#"
875878
[SUMMARY] [FILE_NUM] files, [FILE_SIZE]B total
876879
[WARNING] no files deleted due to --dry-run

0 commit comments

Comments
 (0)