Skip to content

Commit

Permalink
show diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexendoo committed Aug 12, 2024
1 parent 5418add commit a9057aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ anstream = "0.6.0"
[dev-dependencies]
cargo_metadata = "0.18.1"
ui_test = "0.25"
prettydiff = "0.7"
regex = "1.5.5"
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0.122"
Expand Down
3 changes: 2 additions & 1 deletion tests/config-metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ and lints affected.
if env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0") {
fs::write(path, expected).unwrap();
} else {
panic!("`{path}` is out of date, run `cargo bless --test config-metadata` to update it");
let diff = prettydiff::diff_lines(&current, &expected);
panic!("`{path}` is out of date, run `cargo bless --test config-metadata` to update it\n{diff}");
}
}
}
Expand Down

0 comments on commit a9057aa

Please sign in to comment.