From ef180ec3e7a8966238d19ad331b64d66aaa00c52 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 10 Sep 2008 14:51:45 +0100 Subject: [PATCH] inetcomm/tests: Add a test for IMimeInternational_SetDefaultCharset. --- dlls/inetcomm/tests/mimeintl.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/inetcomm/tests/mimeintl.c b/dlls/inetcomm/tests/mimeintl.c index 746628a930a..0fc514fe5d2 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); }