Add a test for G_USER_DIRECTOR_DESKTOP

Based on a patch by Marc-Antoine Perennou,
https://bugzilla.gnome.org/show_bug.cgi?id=676594
This commit is contained in:
Matthias Clasen 2012-06-23 17:51:11 -04:00
parent 53b48dfd3b
commit 1c6070a679

View File

@ -430,6 +430,19 @@ test_special_dir (void)
g_assert_cmpstr (dir, ==, dir2);
}
static void
test_desktop_special_dir (void)
{
const gchar *dir, *dir2;
dir = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
g_assert (dir != NULL);
g_reload_user_special_dirs_cache ();
dir2 = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
g_assert (dir2 != NULL);
}
static void
test_clear_pointer (void)
{
@ -492,6 +505,7 @@ main (int argc,
g_test_add_func ("/utils/hostname", test_hostname);
g_test_add_func ("/utils/xdgdirs", test_xdg_dirs);
g_test_add_func ("/utils/specialdir", test_special_dir);
g_test_add_func ("/utils/specialdir/desktop", test_desktop_special_dir);
g_test_add_func ("/utils/clear-pointer", test_clear_pointer);
g_test_add_func ("/utils/misc-mem", test_misc_mem);