Skip to content

Commit a9057aa

Browse files
committed
show diff
1 parent 5418add commit a9057aa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ anstream = "0.6.0"
3232
[dev-dependencies]
3333
cargo_metadata = "0.18.1"
3434
ui_test = "0.25"
35+
prettydiff = "0.7"
3536
regex = "1.5.5"
3637
serde = { version = "1.0.145", features = ["derive"] }
3738
serde_json = "1.0.122"

tests/config-metadata.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ and lints affected.
3939
if env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0") {
4040
fs::write(path, expected).unwrap();
4141
} else {
42-
panic!("`{path}` is out of date, run `cargo bless --test config-metadata` to update it");
42+
let diff = prettydiff::diff_lines(&current, &expected);
43+
panic!("`{path}` is out of date, run `cargo bless --test config-metadata` to update it\n{diff}");
4344
}
4445
}
4546
}

0 commit comments

Comments
 (0)