[librsvg: 37/53] Setup the font map before running a reference test




commit 20d6ad0f9bb4c293edb277109d3665b8c3ae9631
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Oct 21 19:11:32 2020 -0500

    Setup the font map before running a reference test
    
    It sucks that we have to run setup_font_map with Once, but that's
    because test binaries have no pre-setup phase.

 tests/src/reference.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/tests/src/reference.rs b/tests/src/reference.rs
index 9011133d..8c25f173 100644
--- a/tests/src/reference.rs
+++ b/tests/src/reference.rs
@@ -16,7 +16,7 @@ use std::fs::File;
 use std::io::BufReader;
 use std::path::PathBuf;
 
-use crate::utils::fixture_path;
+use crate::utils::{fixture_path, setup_font_map};
 
 use self::duplicated_from_librsvg_crate::compare_to_file;
 
@@ -37,6 +37,8 @@ const TEST_SUITE_DPI: f64 = 72.0;
 const FRAME_SIZE: i32 = 47;
 
 fn reference_test(name: &str) {
+    setup_font_map();
+
     let path = fixture_path(name);
     let path_base_name = path.file_stem().unwrap().to_string_lossy().to_owned();
     if path_base_name.starts_with("ignore") {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]