Commit ce3fe02a authored by Michael Catanzaro's avatar Michael Catanzaro

tests: Further improve uselocale useage

parent 58eba765
Pipeline #61186 passed with stage
in 6 minutes and 34 seconds
......@@ -439,18 +439,17 @@ test_ui_file (GFile *file,
GnomeWallClock *clock;
GDateTime *datetime;
char *str;
locale_t loc, set_locale;
locale_t loc, previous_locale;
ui_file = g_file_get_path (file);
locale = get_locale_for_file (ui_file);
g_assert (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);
previous_locale = uselocale (loc);
g_assert_true (previous_locale != (locale_t) 0);
clock = gnome_wall_clock_new();
clock = gnome_wall_clock_new ();
datetime = g_date_time_new_local (2014, 5, 28, 23, 59, 59);
str = gnome_wall_clock_string_for_datetime (clock,
datetime,
......@@ -460,6 +459,9 @@ test_ui_file (GFile *file,
g_date_time_unref (datetime);
g_object_unref (clock);
uselocale (previous_locale);
freelocale (loc);
provider = add_extra_css (ui_file, ".css");
ui_image = snapshot_ui_file (ui_file, str);
......
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