Module: wine Branch: master Commit: ef180ec3e7a8966238d19ad331b64d66aaa00c52 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ef180ec3e7a8966238d19ad331...
Author: Huw Davies huw@codeweavers.com Date: Wed Sep 10 14:51:45 2008 +0100
inetcomm/tests: Add a test for IMimeInternational_SetDefaultCharset.
---
dlls/inetcomm/tests/mimeintl.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dlls/inetcomm/tests/mimeintl.c b/dlls/inetcomm/tests/mimeintl.c index 746628a..0fc514f 100644 --- a/dlls/inetcomm/tests/mimeintl.c +++ b/dlls/inetcomm/tests/mimeintl.c @@ -185,7 +185,7 @@ static void test_defaultcharset(void) { IMimeInternational *internat; HRESULT hr; - HCHARSET hcs_default, hcs; + HCHARSET hcs_default, hcs, hcs_windows_1251;
hr = MimeOleGetInternat(&internat); ok(hr == S_OK, "ret %08x\n", hr); @@ -196,6 +196,17 @@ static void test_defaultcharset(void) ok(hr == S_OK, "ret %08x\n", hr); ok(hcs_default == hcs, "Unexpected default charset\n");
+ hr = IMimeInternational_FindCharset(internat, "windows-1251", &hcs_windows_1251); + ok(hr == S_OK, "got %08x\n", hr); + hr = IMimeInternational_SetDefaultCharset(internat, hcs_windows_1251); + ok(hr == S_OK, "ret %08x\n", hr); + hr = IMimeInternational_GetDefaultCharset(internat, &hcs); + ok(hr == S_OK, "ret %08x\n", hr); + ok(hcs == hcs_windows_1251, "didn't retrieve recently set default\n"); + /* Set the old default back again */ + hr = IMimeInternational_SetDefaultCharset(internat, hcs_default); + ok(hr == S_OK, "ret %08x\n", hr); + IMimeInternational_Release(internat); }