[glib/wip/pwithnall/backport-2978-osx-test-fixes-glib-2-74: 2/2] tests: Check for public.text not text/plain on OSX




commit 428f6421fbb2a0585ef43e4e5a0cc5329141419c
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 | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gio/tests/file.c b/gio/tests/file.c
index ccac590a41..79c6d57bb9 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -3556,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);


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