Merge branch 'wip/pwithnall/fix-environment-tests' into 'main'

tests: Fix environment test on FreeBSD

See merge request GNOME/glib!2407
This commit is contained in:
Sebastian Dröge 2021-12-24 10:08:50 +00:00
commit 8ca2a7d7c8

View File

@ -113,7 +113,10 @@ test_getenv (void)
g_assert_true (g_setenv ("foo", "bar=baz", TRUE)); g_assert_true (g_setenv ("foo", "bar=baz", TRUE));
/* Different OSs return different values; some return NULL because the key
* is invalid, but some are happy to return what we set above. */
data = g_getenv ("foo=bar"); data = g_getenv ("foo=bar");
if (data != NULL)
g_assert_cmpstr (data, ==, "baz"); g_assert_cmpstr (data, ==, "baz");
data = g_getenv ("foo"); data = g_getenv ("foo");