diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2022-10-19 10:20:34 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2022-10-19 10:20:34 +0000 |
commit | 08cb200aec399b38f0cd825340a71fe6caadfb1b (patch) | |
tree | a9c9734843773325c2bdab00ca15f71df2f0053b | |
parent | 7cc95e0211a84fed0baecf639d8a864cc8eda3df (diff) | |
parent | 8f85fa163b3e68d48e221059004fe334cf5303e4 (diff) | |
download | glib-08cb200aec399b38f0cd825340a71fe6caadfb1b.tar.gz |
Merge branch 'halfline-no-spawn' into 'main'
A couple of test fixes on OS X
See merge request GNOME/glib!2978
-rw-r--r-- | gio/tests/file.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gio/tests/file.c b/gio/tests/file.c index 36dccac66..79c6d57bb 100644 --- a/gio/tests/file.c +++ b/gio/tests/file.c @@ -2472,10 +2472,14 @@ get_size_from_du (const gchar *path, guint64 *size) GError *error = NULL; gchar *du_path = NULL; - /* If we can’t find du, don’t try and run the test. */ +#ifndef HAVE_COCOA du_path = g_find_program_in_path ("du"); +#endif + + /* If we can’t find du, don’t try and run the test. */ if (du_path == NULL) return FALSE; + g_free (du_path); du = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE, @@ -3552,7 +3556,11 @@ test_query_zero_length_content_type (void) NULL, &error); g_assert_no_error (error); +#ifndef HAVE_COCOA g_assert_cmpstr (g_file_info_get_content_type (file_info), ==, "text/plain"); +#else + g_assert_cmpstr (g_file_info_get_content_type (file_info), ==, "public.text"); +#endif g_clear_object (&file_info); g_clear_object (&empty_file); |