[gnome-desktop/wip/hadess/ci-improvements: 9/9] tests: Check that setting the locale worked



commit 6980d8c0e2918140145e4fd90dba2803fa6b68c0
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 29 12:21:10 2019 +0100

    tests: Check that setting the locale worked

 tests/wallclock-reftest.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/tests/wallclock-reftest.c b/tests/wallclock-reftest.c
index fe71b5a5..3db9cf1d 100644
--- a/tests/wallclock-reftest.c
+++ b/tests/wallclock-reftest.c
@@ -438,13 +438,14 @@ test_ui_file (GFile         *file,
   GtkStyleProvider *provider;
   GnomeWallClock *clock;
   GDateTime *datetime;
-  char *str;
+  char *str, *set_locale;
 
   ui_file = g_file_get_path (file);
 
   locale = get_locale_for_file (ui_file);
   g_assert (locale);
-  setlocale (LC_ALL, locale);
+  set_locale = setlocale (LC_ALL, locale);
+  g_assert_cmpstr (set_locale, ==, locale);
 
   clock = gnome_wall_clock_new();
   datetime = g_date_time_new_local (2014, 5, 28, 23, 59, 59);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]