mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 03:46:17 +01:00
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>
This commit is contained in:
parent
3dec72b946
commit
c4d46d632f
@ -2585,11 +2585,11 @@ test_identifier (void)
|
|||||||
g_time_zone_unref (tz);
|
g_time_zone_unref (tz);
|
||||||
|
|
||||||
/* System timezone. We can’t change this, but we can at least assert that
|
/* 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);
|
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_nonnull (g_time_zone_get_identifier (tz));
|
||||||
g_assert_cmpstr (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);
|
g_time_zone_unref (tz);
|
||||||
|
|
||||||
/* Local timezone tests. */
|
/* Local timezone tests. */
|
||||||
|
Loading…
Reference in New Issue
Block a user