Skip to content

PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust

test(pdfcraft): cut main.rs at the moved test module's declaration

aionggd39b6629c8ff
diff --git a/apps/pdfcraft/src/tests.rs b/apps/pdfcraft/src/tests.rs
index d8dacb6b2..e393dab5a 100644
--- a/apps/pdfcraft/src/tests.rs
+++ b/apps/pdfcraft/src/tests.rs
@@ -684,7 +684,7 @@ fn the_desktop_entry_names_the_window_class() {
fn start_up_and_the_panic_hook_never_use_eprintln() {
let source = include_str!("main.rs");
// Everything before the top-level test module is product code.
- let product = source.split("\n#[cfg(test)]\nmod tests {").next().unwrap_or(source);
+ let product = source.split("\n#[cfg(test)]\nmod tests;").next().unwrap_or(source);
assert!(product.len() < source.len(), "found the end of the product code");
let offenders: Vec<_> = product
.lines()