glib/tests: fix foo=bar=baz environment test

The handling of that case isn't well specified, and system dependent.

However if the system decided that "foo=bar" was the key, then don't
expect "foo" is set.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-01-26 12:54:20 +04:00 committed by Philip Withnall
parent 4403704826
commit 0ca9edd15f

View File

@ -118,9 +118,11 @@ test_getenv (void)
data = g_getenv ("foo=bar");
if (data != NULL)
g_assert_cmpstr (data, ==, "baz");
data = g_getenv ("foo");
g_assert_cmpstr (data, ==, "bar=baz");
else
{
data = g_getenv ("foo");
g_assert_cmpstr (data, ==, "bar=baz");
}
if (g_test_undefined ())
{