summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-03 10:33:18 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-03 10:33:18 +0200
commitad347632ab95e29eb5180b27142f5c264dfc611a (patch)
tree2742a33f4c3d800a86e977de04fa2cec7104c43f /tests/src
parentbcc014c4e177cc4e8cf5ca8c24990908b507c0f8 (diff)
Make ligatures copyable and searchable
Fixes #479 Fixes #1040
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/tests.rs12
1 files changed, 11 insertions, 1 deletions
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);