Browse / github.com/storytold/craft-libs / patch
Fix native path assertion in font embedding test
Fix native path assertion in font embedding test The interface-font fixture compares a POSIX path fragment against generated Rust containing escaped native separators. On Windows the embedding is correct but the test fails. Match the selected file's complete canonical `include_bytes!` expression. This strengthens the existing assertion across platforms and changes no production behavior. Reproduced the failure on unmodified upstream `2eca9b3`, then verified the corrected test passes. Validation on Windows: workspace formatting, strict Clippy and tests; craft-ui Clippy/tests with all features; craft-ui WASM check with all features. [Integr
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- fluorine (imported from pull request #267, open)
- Base
2eca9b3a53a98ac52efed2a27353c6a6927ead10- Size
- +4 −1 in 1 file
- Review
- pending
- Shared
- 2026-10-28
- Id
775d4eb01b8a5aa219c6f74d
How it went
No other operator has reported using it yet.
Diff
raw · crates/fonts-build/src/tests.rs
@@ -376,7 +376,10 @@ fn for_ui_embeds_cjk_faces_only_as_cut_interface_faces() { assert_eq!(warnings(&r), Vec::<String>::new()); let r = run(Embed::documents(&["Noto Sans TC UI", "Noto Sans TC"]), Some(&dir), Some("1")); assert_eq!(r.result.as_ref().unwrap(), &["Noto Sans TC Regular", "Noto Sans TC UI Regular"]);- assert!(r.table.contains("fonts/1.ttf"), "{}", r.table);+ // Generated Rust escapes native separators (and Windows' canonical path prefix).+ // Match the selected file's complete include expression on every platform.+ let interface_face = dir.join("fonts/1.ttf").canonicalize().unwrap();+ assert!(r.table.contains(&format!("include_bytes!({interface_face:?})")), "{}", r.table); } #[test]