From ad347632ab95e29eb5180b27142f5c264dfc611a Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 3 May 2023 10:33:18 +0200 Subject: Make ligatures copyable and searchable Fixes #479 Fixes #1040 --- tests/src/tests.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/src') diff --git a/tests/src/tests.rs b/tests/src/tests.rs index 0e22084c..2a0b74ea 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -353,9 +353,18 @@ fn test( pdf_path: Option<&Path>, args: &Args, ) -> bool { - let name = src_path.strip_prefix(TYP_DIR).unwrap_or(src_path); + struct PanicGuard<'a>(&'a Path); + impl Drop for PanicGuard<'_> { + fn drop(&mut self) { + if std::thread::panicking() { + println!("Panicked in {}", self.0.display()); + } + } + } + let name = src_path.strip_prefix(TYP_DIR).unwrap_or(src_path); let text = fs::read_to_string(src_path).unwrap(); + let _guard = PanicGuard(name); let mut output = String::new(); let mut ok = true; @@ -401,6 +410,7 @@ fn test( line, &mut rng, ); + ok &= part_ok; compare_ever |= compare_here; frames.extend(part_frames); -- cgit v1.2.3