If the variable does not exist, just return.

This commit is contained in:
Jakob Eriksson 2005-03-22 18:17:07 +00:00 committed by Alexandre Julliard
parent 4364d06821
commit c515a306e6
1 changed files with 3 additions and 5 deletions

View File

@ -215,15 +215,13 @@ static void test_ExpandEnvironmentStringsA()
{
char buf[256], buf1[256];
DWORD ret_size, ret_size1;
int error;
ret_size1 = GetWindowsDirectoryA(buf1,256);
ok ((ret_size1 >0) && (ret_size1<256), "GetWindowsDirectory Failed\n");
ret_size = ExpandEnvironmentStringsA("%SystemRoot%",buf,sizeof(buf));
error = GetLastError();
ok(!strcmp(buf, buf1),
"ExpandEnvironmentStrings failed %s vs %s. GetLastError() == %d, ret_size = %ld\n",
buf, buf1, error, ret_size);
if (ERROR_ENVVAR_NOT_FOUND == GetLastError())
return;
ok(!strcmp(buf, buf1), "ExpandEnvironmentStrings failed %s vs %s. ret_size = %ld\n", buf, buf1, ret_size);
}
START_TEST(environ)