mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
Font menu: the Document filter test holds other tests' font changes back
the_document_filter_lists_the_families_the_documents_type_uses lists every family, turns the Document filter on and off, and expects the same list again. A composite font that a test running alongside registers in the process-wide font database in between shows up at the top of the second list, and the test fails. The test now holds test_fonts::steady_fonts on the global database from before its first listing, so those changes wait until it ends.
This commit is contained in:
1 parent
9fff48d88f
commit
38595ca3fd
1 file changed
+3
@@ -1176,6 +1176,9 @@ fn the_document_filter_lists_the_families_the_documents_type_uses() {
|
||||
app.run("object.lock", serde_json::json!({})).unwrap();
|
||||
app.run("text.create", serde_json::json!({"x": 20, "y": 150, "text": "Missing", "font": "Missing Family 7059"})).unwrap();
|
||||
let db = vectorcraft_text::FontDb::global();
|
||||
// Tests running alongside register composite fonts and load fonts in the process-wide database;
|
||||
// their changes wait until this test ends, so both listings of every family are the same.
|
||||
let _steady = vectorcraft_text::test_fonts::steady_fonts(db);
|
||||
let used = super::document_families(db, &app.session.active().unwrap().doc);
|
||||
let mut names: Vec<_> = used.iter().cloned().collect();
|
||||
names.sort();
|
||||
|
||||
Reference in new issue
Block a user