[tepl/fix-interactive-tests] tests/*.c: Call gtk_source_init()



commit 03a3556a0fce2b49053790180a7851588f75bfc2
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri May 8 19:03:35 2020 +0800

    tests/*.c: Call gtk_source_init()
    
    This way, we can ensure that if translations from GtkSourceview are
    being used, that gettext will encode the translated strings in UTF-8,
    so that we won't crash due to bad UTF-8 strings when we try to create
    the text buffer.

 tests/test-fold-region.c           | 1 +
 tests/test-gutter-renderer-folds.c | 1 +
 tests/test-tab.c                   | 1 +
 3 files changed, 3 insertions(+)
---
diff --git a/tests/test-fold-region.c b/tests/test-fold-region.c
index 801e582..18657a7 100644
--- a/tests/test-fold-region.c
+++ b/tests/test-fold-region.c
@@ -37,6 +37,7 @@ main (int argc, char *argv[])
        GtkWidget *window;
        GtkWidget *scrolled_window;
 
+       gtk_source_init ();
        gtk_init (&argc, &argv);
 
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
diff --git a/tests/test-gutter-renderer-folds.c b/tests/test-gutter-renderer-folds.c
index 6ff2e18..8ba86ca 100644
--- a/tests/test-gutter-renderer-folds.c
+++ b/tests/test-gutter-renderer-folds.c
@@ -33,6 +33,7 @@ main (int argc, char *argv[])
        GtkWidget *window;
        GtkWidget *scrolled_window;
 
+       gtk_source_init ();
        gtk_init (&argc, &argv);
 
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
diff --git a/tests/test-tab.c b/tests/test-tab.c
index a4e7db9..04b802c 100644
--- a/tests/test-tab.c
+++ b/tests/test-tab.c
@@ -209,6 +209,7 @@ main (gint    argc,
 {
        GtkWidget *window;
 
+       gtk_source_init ();
        gtk_init (&argc, &argv);
 
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);


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