Module: wine Branch: master Commit: 9229c19d01cb4011d58b5f4deb791951e668e4a7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9229c19d01cb4011d58b5f4deb...
Author: Huw Davies huw@codeweavers.com Date: Wed Sep 10 12:38:41 2008 +0100
inetcomm/tests: Tests for IMimeInternational_FindCharset.
---
dlls/inetcomm/tests/mimeintl.c | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/dlls/inetcomm/tests/mimeintl.c b/dlls/inetcomm/tests/mimeintl.c index defe3f9..0075cb5 100644 --- a/dlls/inetcomm/tests/mimeintl.c +++ b/dlls/inetcomm/tests/mimeintl.c @@ -52,9 +52,35 @@ static void test_create(void) IMimeInternational_Release(internat); }
+static void test_charset(void) +{ + IMimeInternational *internat; + HRESULT hr; + HCHARSET hcs, hcs_windows_1252, hcs_windows_1251; + + hr = MimeOleGetInternat(&internat); + ok(hr == S_OK, "ret %08x\n", hr); + + hr = IMimeInternational_FindCharset(internat, "non-existent", &hcs); + ok(hr == MIME_E_NOT_FOUND, "got %08x\n", hr); + + hr = IMimeInternational_FindCharset(internat, "windows-1252", &hcs_windows_1252); + ok(hr == S_OK, "got %08x\n", hr); + hr = IMimeInternational_FindCharset(internat, "windows-1252", &hcs); + ok(hr == S_OK, "got %08x\n", hr); + ok(hcs_windows_1252 == hcs, "got different hcharsets for the same name\n"); + + hr = IMimeInternational_FindCharset(internat, "windows-1251", &hcs_windows_1251); + ok(hr == S_OK, "got %08x\n", hr); + ok(hcs_windows_1252 != hcs_windows_1251, "got the same hcharset for the different names\n"); + + IMimeInternational_Release(internat); +} + START_TEST(mimeintl) { OleInitialize(NULL); test_create(); + test_charset(); OleUninitialize(); }