Author: akhaldi
Date: Sat Jan 28 17:12:03 2012
New Revision: 55274
URL:
http://svn.reactos.org/svn/reactos?rev=55274&view=rev
Log:
[MLANG_WINETEST]
* Sync to Wine 1.3.37.
Modified:
trunk/rostests/winetests/mlang/CMakeLists.txt
trunk/rostests/winetests/mlang/mlang.c
trunk/rostests/winetests/mlang/mlang.rbuild
Modified: trunk/rostests/winetests/mlang/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mlang/CMakeList…
==============================================================================
--- trunk/rostests/winetests/mlang/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/winetests/mlang/CMakeLists.txt [iso-8859-1] Sat Jan 28 17:12:03 2012
@@ -6,5 +6,5 @@
add_executable(mlang_winetest mlang.c testlist.c)
target_link_libraries(mlang_winetest wine uuid)
set_module_type(mlang_winetest win32cui)
-add_importlibs(mlang_winetest oleaut32 ole32 gdi32 msvcrt kernel32 ntdll)
+add_importlibs(mlang_winetest mlang oleaut32 ole32 gdi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET mlang_winetest DESTINATION reactos/bin FOR all)
Modified: trunk/rostests/winetests/mlang/mlang.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mlang/mlang.c?r…
==============================================================================
--- trunk/rostests/winetests/mlang/mlang.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mlang/mlang.c [iso-8859-1] Sat Jan 28 17:12:03 2012
@@ -253,28 +253,6 @@
WideCharToMultiByte(CP_ACP, 0, (szString2), -1, string2, 256, NULL, NULL); \
ok(0, (format), string1, string2); \
}
-
-/* lstrcmpW is not supported on Win9x! */
-static int mylstrcmpW(const WCHAR* str1, const WCHAR* str2)
-{
- if (!str2) return 1;
- while (*str1 && *str1==*str2) {
- str1++;
- str2++;
- }
- return *str1-*str2;
-}
-
-/* lstrcpyW is not supported on Win95 */
-static void mylstrcpyW(WCHAR* str1, const WCHAR* str2)
-{
- while (str2 && *str2) {
- *str1 = *str2;
- str1++;
- str2++;
- }
- *str1 = '\0';
-}
static void test_multibyte_to_unicode_translations(IMultiLanguage2 *iML2)
{
@@ -586,8 +564,6 @@
#ifdef DUMP_CP_INFO
trace("%u: codepage %u family %u\n", i, cpinfo[i].uiCodePage,
cpinfo[i].uiFamilyCodePage);
#endif
- /* Win95 does not support UTF-7 */
- if (cpinfo[i].uiCodePage == CP_UTF7) continue;
/* support files for some codepages might be not installed, or
* the codepage is just an alias.
@@ -773,7 +749,6 @@
if (!flags)
{
ok(n == total, "IEnumScript_Next: expected %u, got %u\n", total, n);
- flags = SCRIPTCONTF_SCRIPT_USER | SCRIPTCONTF_SCRIPT_HIDE | SCRIPTCONTF_SCRIPT_SYSTEM;
}
total = n;
@@ -834,7 +809,7 @@
DWORD dwCodePages, dwManyCodePages;
DWORD dwCmpCodePages;
UINT CodePage;
- static const WCHAR str[3] = { 'd', 0x0436, 0xff90 };
+ static const WCHAR str[] = { 'd', 0x0436, 0xff90 };
LONG processed;
HRESULT ret;
@@ -1227,28 +1202,32 @@
ok(!lstrcmpA(rfc1766A, info_table[i].rfc1766),
"#%02d: got '%s' (expected '%s')\n", i, rfc1766A,
info_table[i].rfc1766);
- /* Some IE versions truncate an oversized name one character to short */
- mylstrcpyW(short_broken_name, info_table[i].broken_name);
- short_broken_name[MAX_LOCALE_NAME - 2] = '\0';
+ /* Some IE versions truncate an oversized name one character too short */
+ if (info_table[i].broken_name) {
+ lstrcpyW(short_broken_name, info_table[i].broken_name);
+ short_broken_name[MAX_LOCALE_NAME - 2] = 0;
+ }
if (info_table[i].todo & TODO_NAME) {
todo_wine
- ok( (!mylstrcmpW(prfc->wszLocaleName, info_table[i].localename)) ||
- broken(!mylstrcmpW(prfc->wszLocaleName, info_table[i].broken_name)) ||
/* IE < 6.0 */
- broken(!mylstrcmpW(prfc->wszLocaleName, short_broken_name)),
+ ok( (!lstrcmpW(prfc->wszLocaleName, info_table[i].localename)) ||
+ (info_table[i].broken_name && (
+ broken(!lstrcmpW(prfc->wszLocaleName, info_table[i].broken_name)) ||
/* IE < 6.0 */
+ broken(!lstrcmpW(prfc->wszLocaleName, short_broken_name)))),
"#%02d: got %s (expected %s)\n", i,
wine_dbgstr_w(prfc->wszLocaleName),
wine_dbgstr_w(info_table[i].localename));
}
else
- ok( (!mylstrcmpW(prfc->wszLocaleName, info_table[i].localename)) ||
- broken(!mylstrcmpW(prfc->wszLocaleName, info_table[i].broken_name)) ||
/* IE < 6.0 */
- broken(!mylstrcmpW(prfc->wszLocaleName, short_broken_name)),
+ ok( (!lstrcmpW(prfc->wszLocaleName, info_table[i].localename)) ||
+ (info_table[i].broken_name && (
+ broken(!lstrcmpW(prfc->wszLocaleName, info_table[i].broken_name)) ||
/* IE < 6.0 */
+ broken(!lstrcmpW(prfc->wszLocaleName, short_broken_name)))),
"#%02d: got %s (expected %s)\n", i,
wine_dbgstr_w(prfc->wszLocaleName),
wine_dbgstr_w(info_table[i].localename));
}
- /* SUBLANG_NEUTRAL only allowed for english, arabic, chinese */
+ /* SUBLANG_NEUTRAL only allowed for English, Arabic, Chinese */
ret = IMultiLanguage2_GetRfc1766Info(iML2, MAKELANGID(LANG_GERMAN, SUBLANG_NEUTRAL),
LANG_ENGLISH, prfc);
ok(ret == E_FAIL, "got 0x%x (expected E_FAIL)\n", ret);
@@ -1903,20 +1882,6 @@
UINT i;
HRESULT hr;
- SetLastError(0xdeadbeef);
- lstrcmpW(NULL, NULL);
- if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
- {
- /* This corruption leads (sometimes) to test failures in oleaut32 but also
- * to the inability to use the Regional Settings.
- * This only seems to be an issue with Win98 and IE6 (mlang version
6.0.2800.1106).
- *
- * A reboot restores the codepages again.
- */
- win_skip("IsCodePageInstallable could mess up the codepages on
Win98\n");
- return;
- }
-
for (i = 0; i < 0xffff; i++)
{
hr = IMultiLanguage2_IsCodePageInstallable(ml2, i);
@@ -1932,6 +1897,23 @@
}
}
+static void test_GetGlobalFontLinkObject(void)
+{
+ HRESULT ret;
+ void *unknown;
+
+ ret = GetGlobalFontLinkObject(NULL);
+ ok(ret == E_INVALIDARG, "expected E_INVALIDARG got %#x\n", ret);
+
+ unknown = (void *)0xdeadbeef;
+ ret = GetGlobalFontLinkObject(&unknown);
+todo_wine {
+ ok(ret == S_OK, "expected S_OK got %#x\n", ret);
+ ok(unknown != NULL && unknown != (void *)0xdeadbeef,
+ "GetGlobalFontLinkObject() returned %p\n", unknown);
+ }
+}
+
START_TEST(mlang)
{
IMultiLanguage *iML = NULL;
@@ -1950,6 +1932,7 @@
test_ConvertINetUnicodeToMultiByte();
test_JapaneseConversion();
+ test_GetGlobalFontLinkObject();
trace("IMultiLanguage\n");
ret = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
Modified: trunk/rostests/winetests/mlang/mlang.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mlang/mlang.rbu…
==============================================================================
--- trunk/rostests/winetests/mlang/mlang.rbuild [iso-8859-1] (original)
+++ trunk/rostests/winetests/mlang/mlang.rbuild [iso-8859-1] Sat Jan 28 17:12:03 2012
@@ -8,6 +8,7 @@
<file>testlist.c</file>
<library>wine</library>
<library>uuid</library>
+ <library>mlang</library>
<library>oleaut32</library>
<library>ole32</library>
<library>gdi32</library>