[glib: 1/3] tests: Relax the time zone identifier tests



commit c4d46d632feb04fe569be2cb08c28eb591000955
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Oct 16 14:29:15 2019 +0100

    tests: Relax the time zone identifier tests
    
    On closer reading of `man 3 timezone`, it’s actually permissible for
    `TZ` to contain an absolute path which points to a tzfile file outside
    the system time zone database. This is indeed what happens when building
    GLib under Fedora’s toolbox, so relax that check in the tests.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/tests/gdatetime.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 4ecccb347..339f6345c 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -2585,11 +2585,11 @@ test_identifier (void)
   g_time_zone_unref (tz);
 
   /* System timezone. We can’t change this, but we can at least assert that
-   * the identifier is non-NULL and doesn’t start with a slash. */
+   * the identifier is non-NULL and non-empty. */
   tz = g_time_zone_new (NULL);
+  g_test_message ("System time zone identifier: %s", g_time_zone_get_identifier (tz));
   g_assert_nonnull (g_time_zone_get_identifier (tz));
   g_assert_cmpstr (g_time_zone_get_identifier (tz), !=, "");
-  g_assert_true (*g_time_zone_get_identifier (tz) != '/');
   g_time_zone_unref (tz);
 
   /* Local timezone tests. */


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