mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Merge branch 'wip/pwithnall/more-macos-fixes' into 'main'
tests: Fix macOS failures in the file tests See merge request GNOME/glib!2779
This commit is contained in:
commit
99a7c6351c
@ -587,6 +587,9 @@ g_app_info_create_from_commandline (const char *commandline,
|
||||
GAppInfoCreateFlags flags,
|
||||
GError **error)
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"Creating an app info from a command line not currently supported");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1988,7 +1988,7 @@ on_new_tmp_done (GObject *object,
|
||||
GError *error = NULL;
|
||||
GMainLoop *loop = user_data;
|
||||
gchar *basename;
|
||||
gchar *parent_path;
|
||||
GFile *tmpdir = NULL;
|
||||
|
||||
g_assert_null (object);
|
||||
|
||||
@ -2009,9 +2009,9 @@ on_new_tmp_done (GObject *object,
|
||||
g_assert_no_error (error);
|
||||
|
||||
parent = g_file_get_parent (file);
|
||||
parent_path = g_file_get_path (parent);
|
||||
tmpdir = g_file_new_for_path (g_get_tmp_dir ());
|
||||
|
||||
g_assert_cmpstr (g_get_tmp_dir (), ==, parent_path);
|
||||
g_assert_true (g_file_equal (tmpdir, parent));
|
||||
|
||||
g_main_loop_quit (loop);
|
||||
|
||||
@ -2020,7 +2020,7 @@ on_new_tmp_done (GObject *object,
|
||||
g_object_unref (iostream);
|
||||
g_object_unref (info);
|
||||
g_free (basename);
|
||||
g_free (parent_path);
|
||||
g_object_unref (tmpdir);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2087,7 +2087,7 @@ on_new_tmp_dir_done (GObject *object,
|
||||
GError *error = NULL;
|
||||
GMainLoop *loop = user_data;
|
||||
gchar *basename;
|
||||
gchar *parent_path;
|
||||
GFile *tmpdir = NULL;
|
||||
|
||||
g_assert_null (object);
|
||||
|
||||
@ -2106,9 +2106,9 @@ on_new_tmp_dir_done (GObject *object,
|
||||
g_assert_cmpuint (g_file_info_get_file_type (info), ==, G_FILE_TYPE_DIRECTORY);
|
||||
|
||||
parent = g_file_get_parent (file);
|
||||
parent_path = g_file_get_path (parent);
|
||||
tmpdir = g_file_new_for_path (g_get_tmp_dir ());
|
||||
|
||||
g_assert_cmpstr (g_get_tmp_dir (), ==, parent_path);
|
||||
g_assert_true (g_file_equal (tmpdir, parent));
|
||||
|
||||
g_main_loop_quit (loop);
|
||||
|
||||
@ -2116,7 +2116,7 @@ on_new_tmp_dir_done (GObject *object,
|
||||
g_object_unref (parent);
|
||||
g_object_unref (info);
|
||||
g_free (basename);
|
||||
g_free (parent_path);
|
||||
g_object_unref (tmpdir);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -3493,8 +3493,8 @@ test_query_default_handler_uri (void)
|
||||
GFile *file;
|
||||
GFile *invalid_file;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
g_test_skip ("Default URI handlers are not currently supported on Windows");
|
||||
#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
return;
|
||||
#endif
|
||||
|
||||
@ -3536,8 +3536,8 @@ test_query_default_handler_file (void)
|
||||
const char buffer[] = "Text file!\n";
|
||||
const guint8 binary_buffer[] = "\xde\xad\xbe\xff";
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
g_test_skip ("Default URI handlers are not currently supported on Windows");
|
||||
#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
return;
|
||||
#endif
|
||||
|
||||
@ -3626,8 +3626,8 @@ test_query_default_handler_file_async (void)
|
||||
const guint8 binary_buffer[] = "\xde\xad\xbe\xff";
|
||||
GError *error = NULL;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
g_test_skip ("Default URI handlers are not currently supported on Windows");
|
||||
#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
return;
|
||||
#endif
|
||||
|
||||
@ -3716,8 +3716,8 @@ test_query_default_handler_uri_async (void)
|
||||
GFile *file;
|
||||
GFile *invalid_file;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
g_test_skip ("Default URI handlers are not currently supported on Windows");
|
||||
#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user