Improve GApplication test coverage
[platform/upstream/glib.git] / gio / tests / appinfo.c
index f077a36..e04071a 100644 (file)
@@ -15,6 +15,12 @@ test_launch (void)
   const gchar *path;
   gchar *uri;
 
+  if (g_getenv ("DISPLAY") == NULL || g_getenv ("DISPLAY")[0] == '\0')
+    {
+      g_printerr ("No DISPLAY.  Skipping test.  ");
+      return;
+    }
+
   path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
   appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
   g_assert (appinfo != NULL);