Commit c515a306 authored by Jakob Eriksson's avatar Jakob Eriksson Committed by Alexandre Julliard

If the variable does not exist, just return.

parent 4364d068
......@@ -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)
......
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