[totem-pl-parser/wip/hadess/fix-ci] tests: Detect missing shared-mime-info



commit 36d5b1cda588e0e44f438099c129595acf3e36f5
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jan 28 15:10:29 2021 +0100

    tests: Detect missing shared-mime-info

 plparse/tests/parser.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index 64109ad..c85085d 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -97,6 +97,12 @@ test_resolution (void)
                return;
        }
 
+       if (g_strcmp0 (g_content_type_guess ("foo.html", NULL, 0, NULL), "text/html") != 0) {
+               g_test_message ("“foo.html” isn't detected as text/html, is shared-mime-info installed?");
+               g_test_fail ();
+               return;
+       }
+
        /* http://bugzilla.gnome.org/show_bug.cgi?id=555417 */
        g_assert_cmpstr (test_resolution_real ("http://www.yle.fi/player/player.jsp";, "288629.asx?s=1000"), 
==, "http://www.yle.fi/player/288629.asx?s=1000";);
        g_assert_cmpstr (test_resolution_real 
("http://www.yle.fi/player/player.jsp?actionpage=3&id=288629&locale";, "288629.asx?s=1000"), ==, 
"http://www.yle.fi/player/288629.asx?s=1000";);


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