fix: different call machinery between linux and windows

This filters out diverging backtraces caused by different before-main
and test calling machinery on windows and linux
This commit is contained in:
Tei Leelo Roberts 2024-06-21 20:05:30 +02:00
parent 39ec86532c
commit 4d6e73e5a9

View File

@ -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")
}