Skip to content

Commit

Permalink
fix: different call machinery between linux and windows
Browse files Browse the repository at this point in the history
This filters out diverging backtraces caused by different before-main
and test calling machinery on windows and linux
  • Loading branch information
ten3roberts committed Jun 21, 2024
1 parent 39ec865 commit 4d6e73e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion color-eyre/tests/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ fn test_backwards_compatibility(target: String, file_name: &str) {
fn normalize_backtrace(input: &str) -> String {
input
.lines()
.take_while(|v| !v.contains("core::panic") && !v.contains("theme_test_helper::main"))
.take_while(|v| {
!v.contains("core::panic")
&& !v.contains("theme_test_helper::main")
&& !v.contains("theme::test_error_backwards_compatibility::closure")
&& !v.contains("theme::test_error_backwards_compatibility::{{closure}}")
})
.collect::<Vec<_>>()
.join("\n")
}
Expand Down

0 comments on commit 4d6e73e

Please sign in to comment.