From d97d71948ebadebe87341649eeb4aae69c746ae1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 16 Aug 2024 12:53:12 +0200 Subject: Fix document set rules (#4768) --- tests/src/run.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/src/run.rs') diff --git a/tests/src/run.rs b/tests/src/run.rs index 9681ae4c..c65f5e38 100644 --- a/tests/src/run.rs +++ b/tests/src/run.rs @@ -89,6 +89,7 @@ impl<'a> Runner<'a> { log!(self, "no document, but also no errors"); } + self.check_custom(doc.as_ref()); self.check_document(doc.as_ref()); for error in &errors { @@ -129,6 +130,18 @@ impl<'a> Runner<'a> { } } + /// Run custom checks for which it is not worth to create special + /// annotations. + fn check_custom(&mut self, doc: Option<&Document>) { + let errors = crate::custom::check(self.test, &self.world, doc); + if !errors.is_empty() { + log!(self, "custom check failed"); + for line in errors.lines() { + log!(self, " {line}"); + } + } + } + /// Check that the document output is correct. fn check_document(&mut self, document: Option<&Document>) { let live_path = format!("{}/render/{}.png", crate::STORE_PATH, self.test.name); -- cgit v1.2.3