aboutsummaryrefslogtreecommitdiff
path: root/tests/test-desktop-shortcuts.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-desktop-shortcuts.c')
-rw-r--r--tests/test-desktop-shortcuts.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test-desktop-shortcuts.c b/tests/test-desktop-shortcuts.c
index 02137ef..7594e51 100644
--- a/tests/test-desktop-shortcuts.c
+++ b/tests/test-desktop-shortcuts.c
@@ -92,12 +92,32 @@ test_desktop_shortcuts_nicknames (void)
return;
}
+/* Try executing a shortcut which will touch a file */
+void
+test_desktop_shortcuts_launch (void)
+{
+ IndicatorDesktopShortcuts * ids = indicator_desktop_shortcuts_new(SRCDIR "/test-well-formed.desktop", "Touch");
+ g_assert(ids != NULL);
+
+ const gchar ** nicks = indicator_desktop_shortcuts_get_nicks(ids);
+ g_assert(nicks[0] != NULL);
+
+ g_assert(indicator_desktop_shortcuts_nick_exec(ids, nicks[0]));
+ g_assert(g_file_test("test-desktop-shortcuts-touch-test", G_FILE_TEST_EXISTS));
+
+ g_object_unref(ids);
+
+ return;
+}
+
+/* Build our test suite */
void
test_desktop_shortcuts_suite (void)
{
g_test_add_func ("/libindicator/desktopshortcuts/creation", test_desktop_shortcuts_creation);
g_test_add_func ("/libindicator/desktopshortcuts/globalnosho", test_desktop_shortcuts_globalnoshow);
g_test_add_func ("/libindicator/desktopshortcuts/nicknames", test_desktop_shortcuts_nicknames);
+ g_test_add_func ("/libindicator/desktopshortcuts/launch", test_desktop_shortcuts_launch);
return;
}