Module: wine Branch: master Commit: a5d7cc47edb6c76be9ba1c6f94c5c1ef8b1076f8 URL: https://gitlab.winehq.org/wine/wine/-/commit/a5d7cc47edb6c76be9ba1c6f94c5c1e...
Author: Eric Pouech epouech@codeweavers.com Date: Fri Nov 10 09:13:28 2023 +0100
msvcrt/tests: Add tests about intricating kernel32 and msvcrt env calls.
Signed-off-by: Eric Pouech epouech@codeweavers.com
---
dlls/msvcrt/tests/environ.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/msvcrt/tests/environ.c b/dlls/msvcrt/tests/environ.c index eeee2c8f77d..15e75a2caaf 100644 --- a/dlls/msvcrt/tests/environ.c +++ b/dlls/msvcrt/tests/environ.c @@ -366,6 +366,15 @@ static void test_environment_manipulation(void) ok( count + 1 == env_get_entry_countA( *p_environ ), "Unexpected count\n" ); ok( _putenv( "__winetest_dog=" ) == 0, "Couldn't reset env var\n" ); ok( count == env_get_entry_countA( *p_environ ), "Unexpected count\n" ); + + /* in putenv, only changed variable is updated (no other reload of kernel info is done) */ + ret = SetEnvironmentVariableA( "__winetest_cat", "meow" ); + ok( ret, "SetEnvironmentVariableA failed: %lu\n", GetLastError() ); + ok( _putenv( "__winetest_dog=bark" ) == 0, "Couldn't set env var\n" ); + todo_wine + ok( getenv( "__winetest_cat" ) == NULL, "msvcrt env cache shouldn't have been updated\n" ); + ok( _putenv( "__winetest_cat=" ) == 0, "Couldn't reset env var\n" ); + ok( _putenv( "__winetest_dog=" ) == 0, "Couldn't reset env var\n" ); }
START_TEST(environ)