PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
M14: skip the loader tests when installed faces are switched off
Nick Nyssen21dc64ea5f40
diff --git a/crates/ui-egui/src/system_fonts.rs b/crates/ui-egui/src/system_fonts.rsindex 5eb6f80be..360eec9de 100644--- a/crates/ui-egui/src/system_fonts.rs+++ b/crates/ui-egui/src/system_fonts.rs@@ -458,6 +458,12 @@ mod tests {#[test]fn a_script_fallback_is_the_first_candidate_with_the_probe() {+ // This one calls `script_fallback` too, so it fails under the documented switch that+ // published screenshots use — skip with a reason, as tests/fonts.rs does.+ if installed_faces_switched_off() {+ eprintln!("skipping: PDFCRAFT_SYSTEM_FONTS=0 turns the loader off");+ return;+ }let inter = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/fonts/Inter-Regular.ttf"));let candidates = [PathBuf::from("definitely/not/here.ttf"), inter];assert!(script_fallback(&candidates, 'A').is_some());