mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
Merge branch 'atime' into 'main'
tests: skip g-file-info test if atime unsupported See merge request GNOME/glib!2866
This commit is contained in:
commit
db259b5925
@ -282,6 +282,15 @@ test_g_file_info_access_time (void)
|
||||
NULL, &error);
|
||||
g_assert_no_error (error);
|
||||
|
||||
if (!g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_ACCESS))
|
||||
{
|
||||
g_test_skip ("Skipping testing access time as it’s not supported by the kernel");
|
||||
g_file_delete (file, NULL, NULL);
|
||||
g_clear_object (&file);
|
||||
g_clear_object (&info);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check the access time is retrievable. */
|
||||
dt = g_file_info_get_access_date_time (info);
|
||||
g_assert_nonnull (dt);
|
||||
@ -408,9 +417,7 @@ test_g_file_info_creation_time (void)
|
||||
NULL, &error);
|
||||
g_assert_no_error (error);
|
||||
|
||||
/* Check the creation time is retrievable. */
|
||||
dt = g_file_info_get_creation_date_time (info);
|
||||
if (!dt)
|
||||
if (!g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_CREATED))
|
||||
{
|
||||
g_test_skip ("Skipping testing creation time as it’s not supported by the kernel");
|
||||
g_clear_object (&io_stream);
|
||||
@ -420,6 +427,9 @@ test_g_file_info_creation_time (void)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check the creation time is retrievable. */
|
||||
dt = g_file_info_get_creation_date_time (info);
|
||||
|
||||
/* Try again with microsecond precision. */
|
||||
g_clear_object (&info);
|
||||
info = g_file_query_info (file,
|
||||
|
Loading…
Reference in New Issue
Block a user