mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
glib/tests/enviroment.c: Fix running on Windows
Don't attempt to insert environmental variables in the hash table during the test listenv that is an empty string, as GetEnvironmentStringsW() also returns special enviroment variables which have empty strings as their variable names, at least on Windows 7 and 8. https://bugzilla.gnome.org/show_bug.cgi?id=711047
This commit is contained in:
parent
32cfcc8740
commit
29b66e1458
@ -17,6 +17,7 @@ test_listenv (void)
|
||||
|
||||
parts = g_strsplit (list[i], "=", 2);
|
||||
g_assert (g_hash_table_lookup (table, parts[0]) == NULL);
|
||||
if (g_strcmp0 (parts[0], ""))
|
||||
g_hash_table_insert (table, parts[0], parts[1]);
|
||||
g_free (parts);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user