mlang/tests: Return correct result in Rfc1766ToLcidA on failure.
This commit is contained in:
parent
7bc167ac15
commit
f4def21f57
|
@ -1238,6 +1238,9 @@ HRESULT WINAPI Rfc1766ToLcidA(LCID *lcid, LPCSTR rfc1766A)
|
|||
{
|
||||
WCHAR rfc1766W[MAX_RFC1766_NAME + 1];
|
||||
|
||||
if (!rfc1766A)
|
||||
return E_INVALIDARG;
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, rfc1766A, -1, rfc1766W, MAX_RFC1766_NAME);
|
||||
rfc1766W[MAX_RFC1766_NAME] = 0;
|
||||
|
||||
|
|
|
@ -935,6 +935,12 @@ static void test_Rfc1766ToLcid(void)
|
|||
|
||||
}
|
||||
|
||||
ret = Rfc1766ToLcidA(&lcid, NULL);
|
||||
ok(ret == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", ret);
|
||||
|
||||
ret = Rfc1766ToLcidA(NULL, "en");
|
||||
ok(ret == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", ret);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue