Commit bdb624ff authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msvcrt: Allocate environment variables in separate allocation chunks.

parent a45ca342
......@@ -342,7 +342,6 @@ static void test_environment_manipulation(void)
ok( _putenv( "__winetest_dog=bark" ) == 0, "Couldn't set env var\n" );
ok( !strcmp( (*p_environ)[count + 1], "__winetest_dog=bark" ), "Unexpected env var value\n" );
ok( getenv( "__winetest_dog" ) == strchr( (*p_environ)[count + 1], '=' ) + 1, "Expected getenv() to return pointer inside _environ[] entry\n" );
todo_wine
ok( first == (*p_environ)[count], "Expected stability of _environ[count] pointer\n" );
second = (*p_environ)[count + 1];
ok( count + 2 == env_get_entry_countA( *p_environ ), "Unexpected count\n" );
......@@ -350,13 +349,11 @@ static void test_environment_manipulation(void)
ok( _putenv( "__winetest_cat=purr" ) == 0, "Couldn't set env var\n" );
ok( !strcmp( (*p_environ)[count], "__winetest_cat=purr" ), "Unexpected env var value\n" );
ok( getenv( "__winetest_cat" ) == strchr( (*p_environ)[count], '=' ) + 1, "Expected getenv() to return pointer inside _environ[] entry\n" );
todo_wine
ok( second == (*p_environ)[count + 1], "Expected stability of _environ[count] pointer\n" );
ok( !strcmp( (*p_environ)[count + 1], "__winetest_dog=bark" ), "Couldn't get env var value\n" );
ok( getenv( "__winetest_dog" ) == strchr( (*p_environ)[count + 1], '=' ) + 1, "Expected getenv() to return pointer inside _environ[] entry\n" );
ok( count + 2 == env_get_entry_countA( *p_environ ), "Unexpected count\n" );
ok( _putenv( "__winetest_cat=" ) == 0, "Couldn't reset env vat\n" );
todo_wine
ok( second == (*p_environ)[count], "Expected _environ[count] to be second\n" );
ok( !strcmp( (*p_environ)[count], "__winetest_dog=bark" ), "Unexpected env var value\n" );
ok( count + 1 == env_get_entry_countA( *p_environ ), "Unexpected count\n" );
......@@ -367,7 +364,6 @@ static void test_environment_manipulation(void)
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" );
......
......@@ -240,7 +240,6 @@ static void test_environment_manipulation(void)
ok( _putenv( "__winetest_dog=bark" ) == 0, "Couldn't set env var\n" );
ok( !strcmp( (*p_environ)[count + 1], "__winetest_dog=bark" ), "Unexpected env var value\n" );
ok( getenv( "__winetest_dog" ) == strchr( (*p_environ)[count + 1], '=' ) + 1, "Expected getenv() to return pointer inside _environ[] entry\n" );
todo_wine
ok( first == (*p_environ)[count], "Expected stability of _environ[count] pointer\n" );
second = (*p_environ)[count + 1];
ok( count + 2 == env_get_entry_countA( *p_environ ), "Unexpected count\n" );
......@@ -248,13 +247,11 @@ static void test_environment_manipulation(void)
ok( _putenv( "__winetest_cat=purr" ) == 0, "Couldn't set env var\n" );
ok( !strcmp( (*p_environ)[count], "__winetest_cat=purr" ), "Unexpected env var value\n" );
ok( getenv( "__winetest_cat" ) == strchr( (*p_environ)[count], '=' ) + 1, "Expected getenv() to return pointer inside _environ[] entry\n" );
todo_wine
ok( second == (*p_environ)[count + 1], "Expected stability of _environ[count] pointer\n" );
ok( !strcmp( (*p_environ)[count + 1], "__winetest_dog=bark" ), "Couldn't get env var value\n" );
ok( getenv( "__winetest_dog" ) == strchr( (*p_environ)[count + 1], '=' ) + 1, "Expected getenv() to return pointer inside _environ[] entry\n" );
ok( count + 2 == env_get_entry_countA( *p_environ ), "Unexpected count\n" );
ok( _putenv( "__winetest_cat=" ) == 0, "Couldn't reset env vat\n" );
todo_wine
ok( second == (*p_environ)[count], "Expected _environ[count] to be second\n" );
ok( !strcmp( (*p_environ)[count], "__winetest_dog=bark" ), "Unexpected env var value\n" );
ok( count + 1 == env_get_entry_countA( *p_environ ), "Unexpected count\n" );
......@@ -265,7 +262,6 @@ static void test_environment_manipulation(void)
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" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment