mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Expand GAppInfo tests
This commit is contained in:
parent
51e6edf08b
commit
26a1056bde
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user