tests: Initialise i18n in tests

This commit is contained in:
Bastien Nocera
2021-08-13 23:53:01 +02:00
parent 61a44175ca
commit c5aea53101
4 changed files with 8 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
*
*/
#include <locale.h>
#include "accel-attributes.h"
#define VALID_DISPLAY_LOCATION "display"
@@ -60,6 +61,7 @@ test_accel_location (void)
int main (int argc, char **argv)
{
setlocale(LC_ALL, "");
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/iio-sensor-proxy/accel-location", test_accel_location);

View File

@@ -7,6 +7,7 @@
*
*/
#include <locale.h>
#include "accel-mount-matrix.h"
#define SWAP_Y_Z_MATRIX "1, 0, 0; 0, 0, 1; 0, 1, 0"
@@ -63,6 +64,7 @@ test_mount_matrix (void)
int main (int argc, char **argv)
{
setlocale(LC_ALL, "");
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/iio-sensor-proxy/mount-matrix", test_mount_matrix);

View File

@@ -7,6 +7,7 @@
*
*/
#include <locale.h>
#include <gtk/gtk.h>
#include "orientation.h"
@@ -37,6 +38,7 @@ int main (int argc, char **argv)
GtkWidget *window;
GtkWidget *grid;
setlocale(LC_ALL, "");
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

View File

@@ -9,6 +9,7 @@
#include <glib.h>
#include <stdlib.h>
#include <locale.h>
#include "orientation.h"
#include "accel-mount-matrix.h"
@@ -207,6 +208,7 @@ print_orientation (const char *x_str,
int main (int argc, char **argv)
{
setlocale(LC_ALL, "");
g_test_init (&argc, &argv, NULL);
if (argc > 1) {