mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 11:45:11 +01:00
tests: Set locale in gtestutils tests to allow UTF-8 output
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
dfa7a5b5b5
commit
81dbc7b07b
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
#include <locale.h>
|
||||
#ifdef G_OS_WIN32
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
@ -52,6 +53,8 @@ main (int argc,
|
||||
{
|
||||
char *argv1;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
/* Windows opens std streams in text mode, with \r\n EOLs.
|
||||
* Sometimes it's easier to force a switch to binary mode than
|
||||
|
@ -29,7 +29,7 @@
|
||||
#define G_LOG_DOMAIN "testing"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -1215,6 +1215,8 @@ main (int argc,
|
||||
{
|
||||
argv0 = argv[0];
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
g_test_add_func ("/random-generator/rand-1", test_rand1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user