[glib/halfline-no-spawn] tests: Check for public.text not text/plain on OSX




commit abda1f1b0b6317e348686de9e0216184b04e3aa9
Author: Ray Strode <rstrode redhat com>
Date:   Tue Oct 18 14:41:59 2022 -0400

    tests: Check for public.text not text/plain on OSX
    
    The "content type" on OSX is a Uniform Type Identifier not a MIME
    type, so make sure to use the right format in the empty file test.

 gio/tests/file.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gio/tests/file.c b/gio/tests/file.c
index ccac590a41..bba7b2456d 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -3535,6 +3535,7 @@ test_query_zero_length_content_type (void)
   GFileInfo *file_info;
   GError *error = NULL;
   GFileIOStream *iostream;
+  goffset size;
 
   g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=755795";);
   /* This is historic behaviour. See:
@@ -3556,7 +3557,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);


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