[pango/matthiasc/for-main: 24/25] tests: Make test-itemize work better




commit 0fbcaa7ccae344627f4c901723dc5d82319687ad
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 21 22:18:02 2021 -0400

    tests: Make test-itemize work better
    
    This wasn't working when passed a file
    on the commandline. Fix that.

 tests/test-itemize.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/test-itemize.c b/tests/test-itemize.c
index 0a8515b8..926eb3ae 100644
--- a/tests/test-itemize.c
+++ b/tests/test-itemize.c
@@ -251,8 +251,6 @@ test_itemize (gconstpointer d)
       return;
     }
 
-  context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
-
   found_cantarell = FALSE;
   pango_context_list_families (context, &families, &n_families);
   for (int i = 0; i < n_families; i++)
@@ -305,7 +303,6 @@ test_itemize (gconstpointer d)
   g_free (diff);
   g_string_free (dump, TRUE);
   g_free (expected_file);
-  g_object_unref (context);
 }
 
 int
@@ -318,6 +315,9 @@ main (int argc, char *argv[])
 
   g_test_init (&argc, &argv, NULL);
 
+  context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
+  pango_context_set_language (context, pango_language_from_string ("en-us"));
+
   /* allow to easily generate expected output for new test cases */
   if (argc > 1)
     {


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