1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-15 22:53:34 +02:00

test_copy_preserve_mode: Adjust for the previous revert

Now we're returning the file type again, we need to mask it out to
compare with the mode. We can also check that the statbuf said the file
is a regular file.

Related: 
This commit is contained in:
Iain Lane
2019-11-21 10:33:43 +00:00
parent e330a99f7a
commit 0c88825a75

@ -929,7 +929,8 @@ test_copy_preserve_mode (void)
dest_mode = g_file_info_get_attribute_uint32 (dest_info, G_FILE_ATTRIBUTE_UNIX_MODE); dest_mode = g_file_info_get_attribute_uint32 (dest_info, G_FILE_ATTRIBUTE_UNIX_MODE);
g_assert_cmpint (dest_mode, ==, vectors[i].expected_destination_mode); g_assert_cmpint (dest_mode & ~S_IFMT, ==, vectors[i].expected_destination_mode);
g_assert_cmpint (dest_mode & S_IFMT, ==, S_IFREG);
(void) g_file_delete (tmpfile, NULL, NULL); (void) g_file_delete (tmpfile, NULL, NULL);
(void) g_file_delete (dest_tmpfile, NULL, NULL); (void) g_file_delete (dest_tmpfile, NULL, NULL);