diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-08-26 13:40:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 11:40:37 +0000 |
| commit | cf05284a0cdfb6bff62ecb60baf16bec9853abe4 (patch) | |
| tree | 638bdf1e52277762deb84cdddec77023f90f481a /tests/src/run.rs | |
| parent | 88325d7d019fd65c5177a92df4347ae9a287fc19 (diff) | |
Small improvements to the test runner (#4838)
Diffstat (limited to 'tests/src/run.rs')
| -rw-r--r-- | tests/src/run.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/src/run.rs b/tests/src/run.rs index c65f5e38..f356f0d0 100644 --- a/tests/src/run.rs +++ b/tests/src/run.rs @@ -157,6 +157,10 @@ impl<'a> Runner<'a> { }; let skippable = match document.pages.as_slice() { + [] => { + log!(self, "document has zero pages"); + return; + } [page] => skippable(page), _ => false, }; @@ -231,7 +235,7 @@ impl<'a> Runner<'a> { std::fs::write(&ref_path, &ref_data).unwrap(); log!( into: self.result.infos, - "Updated reference image ({ref_path}, {})", + "updated reference image ({ref_path}, {})", FileSize(ref_data.len()), ); } @@ -414,6 +418,7 @@ fn render_links(canvas: &mut sk::Pixmap, ts: sk::Transform, frame: &Frame) { fn skippable(page: &Page) -> bool { page.frame.width().approx_eq(Abs::pt(120.0)) && page.frame.height().approx_eq(Abs::pt(20.0)) + && page.fill.is_auto() && skippable_frame(&page.frame) } |
