Commit ca8fede7 authored by Jeremy Bicha's avatar Jeremy Bicha 🎹

tests: Use uselocale instead of setlocale

uselocale is generally recommend instead of setlocale as a safer choice.
parent 361885a1
......@@ -438,14 +438,17 @@ test_ui_file (GFile *file,
GtkStyleProvider *provider;
GnomeWallClock *clock;
GDateTime *datetime;
char *str, *set_locale;
char *str;
locale_t loc, set_locale;
ui_file = g_file_get_path (file);
locale = get_locale_for_file (ui_file);
g_assert (locale);
set_locale = setlocale (LC_ALL, locale);
g_assert_cmpstr (set_locale, ==, locale);
loc = newlocale (LC_ALL_MASK, locale, (locale_t) 0);
set_locale = uselocale (loc);
/*TODO: CI fails when I tried to use freelocale (loc); later */
g_assert_true (set_locale != (locale_t) 0);
clock = gnome_wall_clock_new();
datetime = g_date_time_new_local (2014, 5, 28, 23, 59, 59);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment