diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2019-02-20 18:25:45 -0600 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2019-02-20 18:28:37 -0600 |
commit | ce3fe02a2e0d3d516b2970c6763a7af2136b9a49 (patch) | |
tree | 7d264a68582757bea3c459be62bfca5fa8b5ecc6 /tests | |
parent | 58eba765305906b97a2e89723e92bfdc4cb36eeb (diff) | |
download | gnome-desktop-ce3fe02a2e0d3d516b2970c6763a7af2136b9a49.tar.gz |
tests: Further improve uselocale useage
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wallclock-reftest.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/wallclock-reftest.c b/tests/wallclock-reftest.c index 42783869..8ac630f2 100644 --- a/tests/wallclock-reftest.c +++ b/tests/wallclock-reftest.c @@ -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); |