[glib: 4/7] glib/tests: fix foo=bar=baz environment test
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/7] glib/tests: fix foo=bar=baz environment test
- Date: Wed, 23 Mar 2022 16:44:17 +0000 (UTC)
commit 0ca9edd15fc7013258869b0a93cc60d37fb4f350
Author: Marc-André Lureau <marcandre lureau redhat com>
Date: Wed Jan 26 12:54:20 2022 +0400
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>
glib/tests/environment.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/glib/tests/environment.c b/glib/tests/environment.c
index 94135507fe..e60c17e2d1 100644
--- a/glib/tests/environment.c
+++ b/glib/tests/environment.c
@@ -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 ())
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]