Module: wine Branch: master Commit: a96db3c35c24624bac4f73e312f05d76ff0960fc URL: http://source.winehq.org/git/wine.git/?a=commit;h=a96db3c35c24624bac4f73e312...
Author: Lei Zhang thestig@google.com Date: Tue Feb 2 12:45:06 2010 -0800
userenv: Add a small test for DestroyEnvironmentBlock.
---
dlls/userenv/tests/userenv.c | 6 ++++++ include/userenv.h | 1 + 2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/userenv/tests/userenv.c b/dlls/userenv/tests/userenv.c index 39c1bbf..c61958f 100644 --- a/dlls/userenv/tests/userenv.c +++ b/dlls/userenv/tests/userenv.c @@ -197,6 +197,12 @@ static void test_create_env(void) r = get_env(env[3], "WINE_XYZZY", &st); expect(TRUE, r); if (r) HeapFree(GetProcessHeap(), 0, st); + + for (i = 0; i < sizeof(env) / sizeof(env[0]); i++) + { + r = DestroyEnvironmentBlock(env[i]); + expect(TRUE, r); + } }
START_TEST(userenv) diff --git a/include/userenv.h b/include/userenv.h index 507715f..de8bbe0 100644 --- a/include/userenv.h +++ b/include/userenv.h @@ -31,6 +31,7 @@ extern "C" { #endif
BOOL WINAPI CreateEnvironmentBlock(LPVOID*,HANDLE,BOOL); +BOOL WINAPI DestroyEnvironmentBlock(LPVOID); BOOL WINAPI ExpandEnvironmentStringsForUserA(HANDLE,LPCSTR,LPSTR,DWORD); BOOL WINAPI ExpandEnvironmentStringsForUserW(HANDLE,LPCWSTR,LPWSTR,DWORD); #define ExpandEnvironmentStringsForUser WINELIB_NAME_AW(ExpandEnvironmentStringsForUser)