From: Matthias Clasen Date: Sun, 3 Jun 2012 20:30:58 +0000 (-0400) Subject: Expand GAppInfo tests X-Git-Tag: 2.33.2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26a1056bde7f6ef97963b1a4b42d3da3027f555f;p=platform%2Fupstream%2Fglib.git Expand GAppInfo tests --- diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c index e8e511a..939e34b 100644 --- a/gio/tests/appinfo.c +++ b/gio/tests/appinfo.c @@ -248,8 +248,22 @@ test_environment (void) { GAppLaunchContext *ctx; gchar **env; + const gchar *path; + + g_unsetenv ("FOO"); + g_unsetenv ("BLA"); + path = g_getenv ("PATH"); ctx = g_app_launch_context_new (); + + env = g_app_launch_context_get_environment (ctx); + + g_assert (g_environ_getenv (env, "FOO") == NULL); + g_assert (g_environ_getenv (env, "BAR") == NULL); + g_assert_cmpstr (g_environ_getenv (env, "PATH"), ==, path); + + g_strfreev (env); + g_app_launch_context_setenv (ctx, "FOO", "bar"); g_app_launch_context_setenv (ctx, "BLA", "bla"); @@ -257,6 +271,7 @@ test_environment (void) g_assert_cmpstr (g_environ_getenv (env, "FOO"), ==, "bar"); g_assert_cmpstr (g_environ_getenv (env, "BLA"), ==, "bla"); + g_assert_cmpstr (g_environ_getenv (env, "PATH"), ==, path); g_strfreev (env);