From 45ec0aa81ea706f7a6fc7f2691d40217cfdac59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 14 Jan 2023 04:15:47 +0100 Subject: [PATCH] tests/gsettings: Check that per-desktop settings are used by GAction's --- gio/tests/gsettings.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c index 1956ac5e6..c7de624a2 100644 --- a/gio/tests/gsettings.c +++ b/gio/tests/gsettings.c @@ -2886,6 +2886,7 @@ static void test_per_desktop (void) { GSettings *settings; + GAction *action_string; TestObject *obj; gpointer p; gchar *str; @@ -2918,6 +2919,10 @@ test_per_desktop (void) g_assert_cmpstr (str, ==, "GNOME"); g_free (str); + action_string = g_settings_create_action (settings, "desktop"); + check_and_free (g_action_get_state (action_string), "'GNOME'"); + + g_clear_object (&action_string); g_object_unref (settings); g_object_unref (obj); } @@ -2929,6 +2934,7 @@ static void test_per_desktop_subprocess (void) { GSettings *settings; + GAction *action_string; TestObject *obj; gpointer p; gchar *str; @@ -2956,6 +2962,10 @@ test_per_desktop_subprocess (void) g_assert_cmpstr (str, ==, "GNOME Classic"); g_free (str); + action_string = g_settings_create_action (settings, "desktop"); + check_and_free (g_action_get_state (action_string), "'GNOME Classic'"); + + g_clear_object (&action_string); g_object_unref (settings); g_object_unref (obj); }