tests/*.c: Call gtk_source_init()
Hi,
From the commit message:
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.
I was trying to build and run tepl's interactive test programs, and in older Visual Studio versions, when GtkSourceView's translations are used, the program crashes in g_convert()
due to invalid UTF-8 strings when doing g_utf8_collate()
when called by GtkSourceView's schemes_compare()
. I was able to avoid the crash by disabling translations; so in order to fix this, call gtk_source_init()
, which sets up its translations be returned in UTF-8, so that we can be assured that we have good UTF-8 strings when trying to run the interactive tests.
With blessings, thank you!