f67d38b35cc5
picker_families.rs
//! Its own test binary: the font database is process-global, so only a fresh process starts
//! with the system fonts not yet scanned (any `resolve` in the lib tests scans them).
use filmcraft_text::fonts::system_scanned;
use filmcraft_text::{families, picker_families};
/// The first list a picker takes must already hold the system families, not the bundled ones only.
#[test]
fn picker_families_scans_before_listing() {
assert!(!system_scanned(), "fresh process: nothing scanned yet");
let fams = picker_families();
assert!(system_scanned(), "picker_families must scan the system fonts");
assert_eq!(fams, families(), "the snapshot is taken after the scan");
}
No file is open. Choose one in the tree, or press Ctrl+O (⌘O on a Mac) to find one by name.
Syntax highlighting could not load. The unmodified read-only text remains available above.