diff --git a/crates/fonts/src/fontdb.rs b/crates/fonts/src/fontdb.rs index 4ad2e749a..e019785b7 100644 --- a/crates/fonts/src/fontdb.rs +++ b/crates/fonts/src/fontdb.rs @@ -1393,11 +1393,10 @@ impl OutlinePen for FlipPen { #[cfg(test)] mod font_dir_tests { - use std::path::Path; - use super::*; - fn assert_fixture_discovered_after_rescan(env: FontEnv, directory: &Path) { + #[cfg(unix)] + fn assert_fixture_discovered_after_rescan(env: FontEnv, directory: &std::path::Path) { let catalog = Arc::new(Catalog::new(env.clone()).with_font_service(false)); catalog.set_confined_dirs(vec![env.root]); let db = FontDb::with_catalog(catalog.clone(), CatalogScope::Isolated); @@ -1519,7 +1518,9 @@ mod font_dir_tests { assert_eq!(cache.elements, before); } + // The catalogue keeps only host-absolute XDG entries, and `/nix/…` is absolute only on a Unix host. #[test] + #[cfg(unix)] fn xdg_data_dirs_contribute_their_fonts_folders() { let root = std::env::temp_dir().join(format!("deckcraft-fonts-xdg-{}", std::process::id())); let _ = std::fs::remove_dir_all(&root); @@ -1541,7 +1542,9 @@ mod font_dir_tests { let _ = std::fs::remove_dir_all(root); } + // A `` of `/…` is absolute only on a Unix host; elsewhere it joins the configuration's folder. #[test] + #[cfg(unix)] fn fontconfig_dir_entries_are_read() { let conf = r#" diff --git a/crates/ui-egui/src/backstage/tests.rs b/crates/ui-egui/src/backstage/tests.rs index e727d92df..291df4534 100644 --- a/crates/ui-egui/src/backstage/tests.rs +++ b/crates/ui-egui/src/backstage/tests.rs @@ -400,6 +400,7 @@ fn host_save_as_under_the_same_name_returns_to_the_slide() { h.state().backstage.as_ref().is_some_and(|view| Arc::ptr_eq(&view.instance, &replacement)), "an old success cannot close a new File view" ); + assert!(h.state().session.active().unwrap().path.is_some(), "the old save still completed"); } #[test]