ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
13 participants
263 discussions
Start a n
N
ew thread
[akhaldi] 70947: [WINHTTP_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:55:00 2016 New Revision: 70947 URL:
http://svn.reactos.org/svn/reactos?rev=70947&view=rev
Log: [WINHTTP_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/winhttp/winhttp.c Modified: trunk/rostests/winetests/winhttp/winhttp.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winhttp/winhttp…
============================================================================== --- trunk/rostests/winetests/winhttp/winhttp.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winhttp/winhttp.c [iso-8859-1] Sat Mar 5 10:55:00 2016 @@ -34,15 +34,19 @@ #include <winhttp.h> #include <wincrypt.h> #include <winreg.h> +#include <stdio.h> //#include "initguid.h" #include <httprequest.h> #include <httprequestid.h> #include <wine/test.h> +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); + static const WCHAR test_useragent[] = {'W','i','n','e',' ','R','e','g','r','e','s','s','i','o','n',' ','T','e','s','t',0}; static const WCHAR test_winehq[] = {'t','e','s','t','.','w','i','n','e','h','q','.','o','r','g',0}; +static const WCHAR test_winehq_https[] = {'h','t','t','p','s',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g',':','4','4','3',0}; static const WCHAR localhostW[] = {'l','o','c','a','l','h','o','s','t',0}; static BOOL proxy_active(void) @@ -975,8 +979,9 @@ static void test_secure_connection(void) { + static const char data_start[] = "<!DOCTYPE html PUBLIC"; HINTERNET ses, con, req; - DWORD size, status, policy, bitness, read_size, err; + DWORD size, status, policy, bitness, read_size, err, available_size; BOOL ret; CERT_CONTEXT *cert; WINHTTP_CERTIFICATE_INFO info; @@ -1055,11 +1060,16 @@ ret = WinHttpReceiveResponse(req, NULL); ok(ret, "failed to receive response %u\n", GetLastError()); + available_size = 0; + ret = WinHttpQueryDataAvailable(req, &available_size); + ok(ret, "failed to query available data %u\n", GetLastError()); + ok(available_size > 2014, "available_size = %u\n", available_size); + status = 0xdeadbeef; size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed unexpectedly %u\n", GetLastError()); - ok(status == 200, "request failed unexpectedly %u\n", status); + ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status); size = 0; ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS_CRLF, NULL, NULL, &size, NULL); @@ -1073,8 +1083,11 @@ ok(ret == TRUE, "WinHttpReadData failed: %u.\n", GetLastError()); if (!size) break; read_size += size; + + if (read_size <= 32) + ok(!memcmp(buffer, data_start, sizeof(data_start)-1), "not expected: %.32s\n", buffer); } - ok(read_size > 2014, "read_size = %u\n", read_size); + ok(read_size >= available_size, "read_size = %u, available_size = %u\n", read_size, available_size); cleanup: WinHttpCloseHandle(req); @@ -1120,7 +1133,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed unexpectedly %u\n", GetLastError()); - ok(status == 200, "request failed unexpectedly %u\n", status); + ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status); WinHttpCloseHandle(req); @@ -1156,7 +1169,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed unexpectedly %u\n", GetLastError()); - ok(status == 200, "request failed unexpectedly %u\n", status); + ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status); done: WinHttpCloseHandle(req); @@ -2000,18 +2013,25 @@ "Server: winetest\r\n" "Connection: close\r\n" "WWW-Authenticate: Basic realm=\"placebo\"\r\n" +"Content-Length: 12\r\n" +"Content-Type: text/plain\r\n" "\r\n"; static const char okauthmsg[] = "HTTP/1.1 200 OK\r\n" "Server: winetest\r\n" "Connection: close\r\n" +"Content-Length: 11\r\n" +"Content-Type: text/plain\r\n" "\r\n"; static const char headmsg[] = "HTTP/1.1 200 OK\r\n" "Content-Length: 100\r\n" "\r\n"; + +static const char unauthorized[] = "Unauthorized"; +static const char hello_world[] = "Hello World"; struct server_info { @@ -2074,9 +2094,16 @@ if (strstr(buffer, "/auth")) { if (strstr(buffer, "Authorization: Basic dXNlcjpwd2Q=")) + { send(c, okauthmsg, sizeof okauthmsg - 1, 0); + send(c, hello_world, sizeof hello_world - 1, 0); + } else + { send(c, noauthmsg, sizeof noauthmsg - 1, 0); + send(c, unauthorized, sizeof unauthorized - 1, 0); + } + continue; } if (strstr(buffer, "/big")) { @@ -2171,7 +2198,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed to query status code %u\n", GetLastError()); - ok(status == 200, "request failed unexpectedly %u\n", status); + ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status); supported = first = target = 0xdeadbeef; SetLastError(0xdeadbeef); @@ -2218,6 +2245,7 @@ static WCHAR pass2W[] = {'p','w','d','2',0}; HINTERNET ses, con, req; DWORD status, size, error, supported, first, target; + char buffer[32]; BOOL ret; ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); @@ -2288,7 +2316,17 @@ size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed to query status code %u\n", GetLastError()); - ok(status == 401, "request failed unexpectedly %u\n", status); + ok(status == HTTP_STATUS_DENIED, "request failed unexpectedly %u\n", status); + + size = 0; + ret = WinHttpReadData(req, buffer, sizeof(buffer), &size); + error = GetLastError(); + ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %u\n", GetLastError()); + if (ret) + { + ok(size == 12, "expected 12, got %u\n", size); + ok(!memcmp(buffer, unauthorized, 12), "got %s\n", buffer); + } supported = first = target = 0xdeadbeef; SetLastError(0xdeadbeef); @@ -2349,7 +2387,17 @@ size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed to query status code %u\n", GetLastError()); - ok(status == 200, "request failed unexpectedly %u\n", status); + ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status); + + size = 0; + ret = WinHttpReadData(req, buffer, sizeof(buffer), &size); + error = GetLastError(); + ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %u\n", GetLastError()); + if (ret) + { + ok(size == 11, "expected 11, got %u\n", size); + ok(!memcmp(buffer, hello_world, 11), "got %s\n", buffer); + } WinHttpCloseHandle(req); WinHttpCloseHandle(con); @@ -2385,7 +2433,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed to query status code %u\n", GetLastError()); - ok(status == 200, "request failed unexpectedly %u\n", status); + ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status); WinHttpCloseHandle(req); WinHttpCloseHandle(con); @@ -2403,7 +2451,7 @@ ret = WinHttpSetOption(req, WINHTTP_OPTION_USERNAME, userW, lstrlenW(userW)); ok(ret, "failed to set username %u\n", GetLastError()); - ret = WinHttpSetOption(req, WINHTTP_OPTION_PASSWORD, pass2W, lstrlenW(passW)); + ret = WinHttpSetOption(req, WINHTTP_OPTION_PASSWORD, passW, lstrlenW(passW)); ok(ret, "failed to set password %u\n", GetLastError()); ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, userW, pass2W, NULL); @@ -2419,7 +2467,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed to query status code %u\n", GetLastError()); - ok(status == 401, "request failed unexpectedly %u\n", status); + ok(status == HTTP_STATUS_DENIED, "request failed unexpectedly %u\n", status); WinHttpCloseHandle(req); WinHttpCloseHandle(con); @@ -2501,7 +2549,7 @@ ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "expected success\n"); - ok(status == 204, "expected status 204, got %d\n", status); + ok(status == HTTP_STATUS_NO_CONTENT, "expected status 204, got %d\n", status); SetLastError(0xdeadbeef); size = sizeof(status); @@ -2575,14 +2623,14 @@ ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); ok(ret, "failed to get status code %u\n", GetLastError()); - ok(status == 200, "got %u\n", status); + ok(status == HTTP_STATUS_OK, "got %u\n", status); len = 0xdeadbeef; size = sizeof(len); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_CONTENT_LENGTH | WINHTTP_QUERY_FLAG_NUMBER, NULL, &len, &size, 0); ok(ret, "failed to get content-length header %u\n", GetLastError()); - ok(len == 100, "got %u\n", len); + ok(len == HTTP_STATUS_CONTINUE, "got %u\n", len); count = 0xdeadbeef; ret = WinHttpQueryDataAvailable(req, &count); @@ -2778,7 +2826,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL ); ok( ret, "failed to query status code %u\n", GetLastError() ); - ok( status == 200, "request failed unexpectedly %u\n", status ); + ok( status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status ); WinHttpCloseHandle( req ); @@ -2795,7 +2843,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL ); ok( ret, "failed to query status code %u\n", GetLastError() ); - ok( status == 200, "request failed unexpectedly %u\n", status ); + ok( status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status ); WinHttpCloseHandle( req ); WinHttpCloseHandle( con ); @@ -2816,7 +2864,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL ); ok( ret, "failed to query status code %u\n", GetLastError() ); - ok( status == 200, "request failed unexpectedly %u\n", status ); + ok( status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status ); WinHttpCloseHandle( req ); @@ -2833,7 +2881,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL ); ok( ret, "failed to query status code %u\n", GetLastError() ); - ok( status == 200 || broken(status == 400), "request failed unexpectedly %u\n", status ); + ok( status == HTTP_STATUS_OK || broken(status == HTTP_STATUS_BAD_REQUEST), "request failed unexpectedly %u\n", status ); WinHttpCloseHandle( req ); WinHttpCloseHandle( con ); @@ -2858,7 +2906,7 @@ size = sizeof(status); ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL ); ok( ret, "failed to query status code %u\n", GetLastError() ); - ok( status == 400, "request failed unexpectedly %u\n", status ); + ok( status == HTTP_STATUS_BAD_REQUEST, "request failed unexpectedly %u\n", status ); WinHttpCloseHandle( req ); WinHttpCloseHandle( con ); @@ -2908,7 +2956,7 @@ memset( &info, 0, sizeof(info) ); ret = WinHttpQueryOption( req, WINHTTP_OPTION_CONNECTION_INFO, &info, &size ); ok( ret, "failed to retrieve connection info %u\n", GetLastError() ); - ok( info.cbSize == sizeof(info), "wrong size %u\n", info.cbSize ); + ok( info.cbSize == sizeof(info) || info.cbSize == sizeof(info) - sizeof(info.cbSize) /* Win7 */, "wrong size %u\n", info.cbSize ); ret = WinHttpReceiveResponse( req, NULL ); ok( ret, "failed to receive response %u\n", GetLastError() ); @@ -2917,7 +2965,7 @@ memset( &info, 0, sizeof(info) ); ret = WinHttpQueryOption( req, WINHTTP_OPTION_CONNECTION_INFO, &info, &size ); ok( ret, "failed to retrieve connection info %u\n", GetLastError() ); - ok( info.cbSize == sizeof(info), "wrong size %u\n", info.cbSize ); + ok( info.cbSize == sizeof(info) || info.cbSize == sizeof(info) - sizeof(info.cbSize) /* Win7 */, "wrong size %u\n", info.cbSize ); WinHttpCloseHandle( req ); WinHttpCloseHandle( con ); @@ -3045,8 +3093,9 @@ WinHttpCloseHandle(ses); } -static void test_IWinHttpRequest(void) +static void test_IWinHttpRequest(int port) { + static const WCHAR data_start[] = {'<','!','D','O','C','T','Y','P','E',' ','h','t','m','l',' ','P','U','B','L','I','C'}; static const WCHAR usernameW[] = {'u','s','e','r','n','a','m','e',0}; static const WCHAR passwordW[] = {'p','a','s','s','w','o','r','d',0}; static const WCHAR url1W[] = {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g',0}; @@ -3062,6 +3111,7 @@ static const WCHAR dateW[] = {'D','a','t','e',0}; static const WCHAR test_dataW[] = {'t','e','s','t','d','a','t','a',128,0}; static const WCHAR utf8W[] = {'u','t','f','-','8',0}; + static const WCHAR unauthW[] = {'U','n','a','u','t','h','o','r','i','z','e','d',0}; HRESULT hr; IWinHttpRequest *req; BSTR method, url, username, password, response = NULL, status_text = NULL, headers = NULL; @@ -3074,6 +3124,7 @@ IStream *stream, *stream2; LARGE_INTEGER pos; char buf[128]; + WCHAR bufW[128]; DWORD count; GetSystemTime( &st ); @@ -3354,6 +3405,7 @@ hr = IWinHttpRequest_get_ResponseText( req, &response ); ok( hr == S_OK, "got %08x\n", hr ); + ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) ); SysFreeString( response ); hr = IWinHttpRequest_get_Status( req, NULL ); @@ -3554,6 +3606,66 @@ SysFreeString( today ); VariantClear( &proxy_server ); VariantClear( &bypass_list ); + + hr = CoCreateInstance( &CLSID_WinHttpRequest, NULL, CLSCTX_INPROC_SERVER, &IID_IWinHttpRequest, (void **)&req ); + ok( hr == S_OK, "got %08x\n", hr ); + + url = SysAllocString( test_winehq_https ); + method = SysAllocString( method3W ); + V_VT( &async ) = VT_BOOL; + V_BOOL( &async ) = VARIANT_FALSE; + hr = IWinHttpRequest_Open( req, method, url, async ); + ok( hr == S_OK, "got %08x\n", hr ); + SysFreeString( method ); + SysFreeString( url ); + + hr = IWinHttpRequest_Send( req, empty ); + ok( hr == S_OK || broken(hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_INVALID_SERVER_RESPONSE )), "got %08x\n", hr ); + if (hr == S_OK) + { + hr = IWinHttpRequest_get_ResponseText( req, &response ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) ); + SysFreeString( response ); + } + + IWinHttpRequest_Release( req ); + + hr = CoCreateInstance( &CLSID_WinHttpRequest, NULL, CLSCTX_INPROC_SERVER, &IID_IWinHttpRequest, (void **)&req ); + ok( hr == S_OK, "got %08x\n", hr ); + + sprintf( buf, "
http://localhost:%d/auth
", port ); + MultiByteToWideChar( CP_ACP, 0, buf, -1, bufW, sizeof(bufW)/sizeof(bufW[0]) ); + url = SysAllocString( bufW ); + method = SysAllocString( method3W ); + V_VT( &async ) = VT_BOOL; + V_BOOL( &async ) = VARIANT_FALSE; + hr = IWinHttpRequest_Open( req, method, url, async ); + ok( hr == S_OK, "got %08x\n", hr ); + SysFreeString( method ); + SysFreeString( url ); + + hr = IWinHttpRequest_get_Status( req, &status ); + ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr ); + + V_VT( &data ) = VT_BSTR; + V_BSTR( &data ) = SysAllocString( test_dataW ); + hr = IWinHttpRequest_Send( req, data ); + ok( hr == S_OK, "got %08x\n", hr ); + SysFreeString( V_BSTR( &data ) ); + + hr = IWinHttpRequest_get_ResponseText( req, &response ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !memcmp( response, unauthW, sizeof(unauthW) ), "got %s\n", wine_dbgstr_w(response) ); + SysFreeString( response ); + + status = 0xdeadbeef; + hr = IWinHttpRequest_get_Status( req, &status ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( status == HTTP_STATUS_DENIED, "got %d\n", status ); + + IWinHttpRequest_Release( req ); + CoUninitialize(); } @@ -4092,7 +4204,6 @@ test_Timeouts(); test_resolve_timeout(); test_credentials(); - test_IWinHttpRequest(); test_IWinHttpRequest_Invoke(); test_WinHttpDetectAutoProxyConfigUrl(); test_WinHttpGetIEProxyConfigForCurrentUser(); @@ -4110,6 +4221,7 @@ if (ret != WAIT_OBJECT_0) return; + test_IWinHttpRequest(si.port); test_connection_info(si.port); test_basic_request(si.port, NULL, basicW); test_no_headers(si.port);
8 years, 9 months
1
0
0
0
[akhaldi] 70946: [WINHTTP] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:51:52 2016 New Revision: 70946 URL:
http://svn.reactos.org/svn/reactos?rev=70946&view=rev
Log: [WINHTTP] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/winhttp/request.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/winhttp/request.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/request.…
============================================================================== --- trunk/reactos/dll/win32/winhttp/request.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/request.c [iso-8859-1] Sat Mar 5 10:51:52 2016 @@ -2411,8 +2411,8 @@ { if (request->hdr.disable_flags & WINHTTP_DISABLE_AUTHENTICATION) break; + if (!handle_authorization( request, status )) break; drain_content( request ); - if (!handle_authorization( request, status )) break; /* recurse synchronously */ if ((ret = send_request( request, NULL, 0, request->optional, request->optional_len, 0, 0, FALSE ))) continue; @@ -3052,7 +3052,7 @@ DWORD target, scheme = WINHTTP_AUTH_SCHEME_BASIC; /* FIXME: query supported schemes */ DWORD err = ERROR_SUCCESS; - TRACE("%p, %s, %p\n", request, debugstr_w(username), password); + TRACE("%p, %s, %p, 0x%08x\n", request, debugstr_w(username), password, flags); EnterCriticalSection( &request->cs ); if (request->state < REQUEST_STATE_OPEN) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Mar 5 10:51:52 2016 @@ -204,7 +204,7 @@ reactos/dll/win32/windowscodecsext # Synced to WineStaging-1.7.55 reactos/dll/win32/winemp3.acm # Synced to WineStaging-1.7.55 reactos/dll/win32/wing32 # Synced to WineStaging-1.7.55 -reactos/dll/win32/winhttp # Synced to WineStaging-1.7.55 +reactos/dll/win32/winhttp # Synced to WineStaging-1.9.4 reactos/dll/win32/wininet # Synced to WineStaging-1.7.55 reactos/dll/win32/winmm # Forked at Wine-20050628 reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
8 years, 9 months
1
0
0
0
[akhaldi] 70945: [WBEMPROX_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:48:40 2016 New Revision: 70945 URL:
http://svn.reactos.org/svn/reactos?rev=70945&view=rev
Log: [WBEMPROX_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/wbemprox/query.c Modified: trunk/rostests/winetests/wbemprox/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wbemprox/query.…
============================================================================== --- trunk/rostests/winetests/wbemprox/query.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wbemprox/query.c [iso-8859-1] Sat Mar 5 10:48:40 2016 @@ -102,7 +102,12 @@ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', 'P','r','o','c','e','s','s',' ','W','H','E','R','E',' ','C','a','p','t','i','o','n',' ', 'L','I','K','E',' ','"','%','f','i','r','e','f','o','x','.','e','x','e','"',0}; - static const WCHAR *test[] = { query1, query2, query3, query4, query5, query6, query7, query8, query9, query10 }; + static const WCHAR query11[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', + 'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',' ','w','h','e','r','e',' ', + 'a','v','a','i','l','a','b','i','l','i','t','y',' ','=',' ','\'','3','\'',0}; + static const WCHAR *test[] = { query1, query2, query3, query4, query5, query6, query7, query8, query9, query10, + query11 }; HRESULT hr; IEnumWbemClassObject *result; BSTR wql = SysAllocString( wqlW );
8 years, 9 months
1
0
0
0
[akhaldi] 70944: [WBEMPROX] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:48:13 2016 New Revision: 70944 URL:
http://svn.reactos.org/svn/reactos?rev=70944&view=rev
Log: [WBEMPROX] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/wbemprox/CMakeLists.txt trunk/reactos/dll/win32/wbemprox/builtin.c trunk/reactos/dll/win32/wbemprox/query.c trunk/reactos/dll/win32/wbemprox/wql.tab.c trunk/reactos/dll/win32/wbemprox/wql.y trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/wbemprox/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wbemprox/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/wbemprox/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wbemprox/CMakeLists.txt [iso-8859-1] Sat Mar 5 10:48:13 2016 @@ -31,7 +31,7 @@ set_source_files_properties(wbemprox.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/wbemprox.rgs) set_module_type(wbemprox win32dll) target_link_libraries(wbemprox uuid wine) -add_importlibs(wbemprox iphlpapi oleaut32 advapi32 user32 gdi32 version winspool ws2_32 msvcrt kernel32 ntdll) +add_importlibs(wbemprox iphlpapi oleaut32 advapi32 user32 gdi32 version winspool ws2_32 rpcrt4 msvcrt kernel32 ntdll) add_dependencies(wbemprox d3d_idl_headers) add_pch(wbemprox wbemprox_private.h SOURCE) add_cd_file(TARGET wbemprox DESTINATION reactos/system32/wbem FOR all) Modified: trunk/reactos/dll/win32/wbemprox/builtin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wbemprox/builtin…
============================================================================== --- trunk/reactos/dll/win32/wbemprox/builtin.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wbemprox/builtin.c [iso-8859-1] Sat Mar 5 10:48:13 2016 @@ -68,8 +68,6 @@ {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','d','i','a',0}; static const WCHAR class_physicalmemoryW[] = {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; -static const WCHAR class_qualifiersW[] = - {'_','_','Q','U','A','L','I','F','I','E','R','S',0}; static const WCHAR class_printerW[] = {'W','i','n','3','2','_','P','r','i','n','t','e','r',0}; static const WCHAR class_process_getowner_outW[] = @@ -79,6 +77,8 @@ {'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0}; static const WCHAR class_processor2W[] = {'C','I','M','_','P','r','o','c','e','s','s','o','r',0}; +static const WCHAR class_qualifiersW[] = + {'_','_','Q','U','A','L','I','F','I','E','R','S',0}; static const WCHAR class_sidW[] = {'W','i','n','3','2','_','S','I','D',0}; static const WCHAR class_sounddeviceW[] = @@ -148,12 +148,16 @@ {'C','u','r','r','e','n','t','V','e','r','t','i','c','a','l','R','e','s','o','l','u','t','i','o','n',0}; static const WCHAR prop_datawidthW[] = {'D','a','t','a','W','i','d','t','h',0}; +static const WCHAR prop_defaultipgatewayW[] = + {'D','e','f','a','u','l','t','I','P','G','a','t','e','w','a','y',0}; static const WCHAR prop_defaultvalueW[] = {'D','e','f','a','u','l','t','V','a','l','u','e',0}; static const WCHAR prop_descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR prop_deviceidW[] = {'D','e','v','i','c','e','I','d',0}; +static const WCHAR prop_dhcpenabledW[] = + {'D','H','C','P','E','n','a','b','l','e','d',0}; static const WCHAR prop_directionW[] = {'D','i','r','e','c','t','i','o','n',0}; static const WCHAR prop_displaynameW[] = @@ -162,6 +166,8 @@ {'D','i','s','k','I','n','d','e','x',0}; static const WCHAR prop_dnshostnameW[] = {'D','N','S','H','o','s','t','N','a','m','e',0}; +static const WCHAR prop_dnsserversearchorderW[] = + {'D','N','S','S','e','r','v','e','r','S','e','a','r','c','h','O','r','d','e','r',0}; static const WCHAR prop_domainW[] = {'D','o','m','a','i','n',0}; static const WCHAR prop_domainroleW[] = @@ -282,6 +288,8 @@ {'S','e','r','v','i','c','e','P','a','c','k','M','i','n','o','r','V','e','r','s','i','o','n',0}; static const WCHAR prop_servicetypeW[] = {'S','e','r','v','i','c','e','T','y','p','e',0}; +static const WCHAR prop_settingidW[] = + {'S','e','t','t','i','n','g','I','D',0}; static const WCHAR prop_smbiosbiosversionW[] = {'S','M','B','I','O','S','B','I','O','S','V','e','r','s','i','o','n',0}; static const WCHAR prop_startmodeW[] = @@ -332,6 +340,8 @@ {'V','i','d','e','o','A','r','c','h','i','t','e','c','t','u','r','e',0}; static const WCHAR prop_videomemorytypeW[] = {'V','i','d','e','o','M','e','m','o','r','y','T','y','p','e',0}; +static const WCHAR prop_videomodedescriptionW[] = + {'V','i','d','e','o','M','o','d','e','D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR prop_videoprocessorW[] = {'V','i','d','e','o','P','r','o','c','e','s','s','o','r',0}; static const WCHAR prop_volumenameW[] = @@ -454,11 +464,16 @@ }; static const struct column col_networkadapterconfig[] = { - { prop_dnshostnameW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_indexW, CIM_UINT32|COL_FLAG_KEY, VT_I4 }, - { prop_ipconnectionmetricW, CIM_UINT32, VT_I4 }, - { prop_ipenabledW, CIM_BOOLEAN }, - { prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC } + { prop_defaultipgatewayW, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC }, + { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_dhcpenabledW, CIM_BOOLEAN }, + { prop_dnshostnameW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_dnsserversearchorderW, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC }, + { prop_indexW, CIM_UINT32|COL_FLAG_KEY, VT_I4 }, + { prop_ipconnectionmetricW, CIM_UINT32, VT_I4 }, + { prop_ipenabledW, CIM_BOOLEAN }, + { prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_settingidW, CIM_STRING|COL_FLAG_DYNAMIC } }; static const struct column col_os[] = { @@ -627,6 +642,7 @@ { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_videoarchitectureW, CIM_UINT16, VT_I4 }, { prop_videomemorytypeW, CIM_UINT16, VT_I4 }, + { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC } }; @@ -844,11 +860,16 @@ }; struct record_networkadapterconfig { - const WCHAR *dnshostname; - UINT32 index; - UINT32 ipconnectionmetric; - int ipenabled; - const WCHAR *mac_address; + const struct array *defaultipgateway; + const WCHAR *description; + int dhcpenabled; + const WCHAR *dnshostname; + const struct array *dnsserversearchorder; + UINT32 index; + UINT32 ipconnectionmetric; + int ipenabled; + const WCHAR *mac_address; + const WCHAR *settingid; }; struct record_operatingsystem { @@ -1017,6 +1038,7 @@ const WCHAR *pnpdevice_id; UINT16 videoarchitecture; UINT16 videomemorytype; + const WCHAR *videomodedescription; const WCHAR *videoprocessor; }; #include "poppack.h" @@ -1159,7 +1181,7 @@ if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; - for (i = 0; i < sizeof(drives); i++) + for (i = 0; i < 26; i++) { if (drives & (1 << i)) { @@ -1581,7 +1603,7 @@ dirstack = alloc_dirstack(2); - for (i = 0; i < sizeof(drives); i++) + for (i = 0; i < 26; i++) { if (!(drives & (1 << i))) continue; @@ -1702,7 +1724,7 @@ dirstack = alloc_dirstack(2); - for (i = 0; i < sizeof(drives); i++) + for (i = 0; i < 26; i++) { if (!(drives & (1 << i))) continue; @@ -1814,7 +1836,7 @@ if (!resize_table( table, 2, sizeof(*rec) )) return FILL_STATUS_FAILED; - for (i = 0; i < sizeof(drives); i++) + for (i = 0; i < 26; i++) { if (drives & (1 << i)) { @@ -1878,7 +1900,7 @@ if (!resize_table( table, 4, sizeof(*rec) )) return FILL_STATUS_FAILED; - for (i = 0; i < sizeof(drives); i++) + for (i = 0; i < 26; i++) { if (drives & (1 << i)) { @@ -1945,7 +1967,7 @@ if (!resize_table( table, 4, sizeof(*rec) )) return FILL_STATUS_FAILED; - for (i = 0; i < sizeof(drives); i++) + for (i = 0; i < 26; i++) { if (drives & (1 << i)) { @@ -2093,6 +2115,82 @@ 0, NI_NAMEREQD )) return NULL; return heap_strdupW( buf ); } +static struct array *get_defaultipgateway( IP_ADAPTER_GATEWAY_ADDRESS *list ) +{ + IP_ADAPTER_GATEWAY_ADDRESS *gateway; + struct array *ret; + ULONG buflen, i = 0, count = 0; + WCHAR **ptr, buf[54]; /* max IPv6 address length */ + + if (!list) return NULL; + for (gateway = list; gateway; gateway = gateway->Next) count++; + + if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL; + if (!(ptr = heap_alloc( sizeof(*ptr) * count ))) + { + heap_free( ret ); + return NULL; + } + for (gateway = list; gateway; gateway = gateway->Next) + { + buflen = sizeof(buf)/sizeof(buf[0]); + if (WSAAddressToStringW( gateway->Address.lpSockaddr, gateway->Address.iSockaddrLength, + NULL, buf, &buflen) || !(ptr[i++] = heap_strdupW( buf ))) + { + for (; i > 0; i--) heap_free( ptr[i - 1] ); + heap_free( ptr ); + heap_free( ret ); + return NULL; + } + } + ret->count = count; + ret->ptr = ptr; + return ret; +} +static struct array *get_dnsserversearchorder( IP_ADAPTER_DNS_SERVER_ADDRESS *list ) +{ + IP_ADAPTER_DNS_SERVER_ADDRESS *server; + struct array *ret; + ULONG buflen, i = 0, count = 0; + WCHAR **ptr, *p, buf[54]; /* max IPv6 address length */ + + if (!list) return NULL; + for (server = list; server; server = server->Next) count++; + + if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL; + if (!(ptr = heap_alloc( sizeof(*ptr) * count ))) + { + heap_free( ret ); + return NULL; + } + for (server = list; server; server = server->Next) + { + buflen = sizeof(buf)/sizeof(buf[0]); + if (WSAAddressToStringW( server->Address.lpSockaddr, server->Address.iSockaddrLength, + NULL, buf, &buflen) || !(ptr[i++] = heap_strdupW( buf ))) + { + for (; i > 0; i--) heap_free( ptr[i - 1] ); + heap_free( ptr ); + heap_free( ret ); + return NULL; + } + if ((p = strrchrW( ptr[i - 1], ':' ))) *p = 0; + } + ret->count = count; + ret->ptr = ptr; + return ret; +} +static WCHAR *get_settingid( UINT32 index ) +{ + GUID guid; + WCHAR *ret, *str; + memset( &guid, 0, sizeof(guid) ); + guid.Data1 = index; + UuidToStringW( &guid, &str ); + ret = heap_strdupW( str ); + RpcStringFreeW( &str ); + return ret; +} static enum fill_status fill_networkadapterconfig( struct table *table, const struct expr *cond ) { @@ -2102,11 +2200,11 @@ DWORD size = 0, ret; enum fill_status status = FILL_STATUS_UNFILTERED; - ret = GetAdaptersAddresses( AF_UNSPEC, 0, NULL, NULL, &size ); + ret = GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, NULL, NULL, &size ); if (ret != ERROR_BUFFER_OVERFLOW) return FILL_STATUS_FAILED; if (!(buffer = heap_alloc( size ))) return FILL_STATUS_FAILED; - if (GetAdaptersAddresses( AF_UNSPEC, 0, NULL, buffer, &size )) + if (GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, NULL, buffer, &size )) { heap_free( buffer ); return FILL_STATUS_FAILED; @@ -2125,11 +2223,16 @@ if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue; rec = (struct record_networkadapterconfig *)(table->data + offset); - rec->dnshostname = get_dnshostname( aa->FirstUnicastAddress ); - rec->index = aa->u.s.IfIndex; - rec->ipconnectionmetric = 20; - rec->ipenabled = -1; - rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength ); + rec->defaultipgateway = get_defaultipgateway( aa->FirstGatewayAddress ); + rec->description = heap_strdupW( aa->Description ); + rec->dhcpenabled = -1; + rec->dnshostname = get_dnshostname( aa->FirstUnicastAddress ); + rec->dnsserversearchorder = get_dnsserversearchorder( aa->FirstDnsServerAddress ); + rec->index = aa->u.s.IfIndex; + rec->ipconnectionmetric = 20; + rec->ipenabled = -1; + rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength ); + rec->settingid = get_settingid( rec->index ); if (!match_row( table, row, cond, &status )) { free_row_values( table, row ); @@ -2824,16 +2927,16 @@ static enum fill_status fill_videocontroller( struct table *table, const struct expr *cond ) { - + static const WCHAR fmtW[] = {'%','u',' ','x',' ','%','u',' ','x',' ','%','I','6','4','u',' ','c','o','l','o','r','s',0}; struct record_videocontroller *rec; HRESULT hr; IDXGIFactory *factory = NULL; IDXGIAdapter *adapter = NULL; DXGI_ADAPTER_DESC desc; - UINT hres = 1024, vres = 768, vidmem = 512 * 1024 * 1024; + UINT row = 0, hres = 1024, vres = 768, vidmem = 512 * 1024 * 1024; const WCHAR *name = videocontroller_deviceidW; enum fill_status status = FILL_STATUS_UNFILTERED; - UINT row = 0; + WCHAR mode[44]; if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; @@ -2869,6 +2972,8 @@ rec->pnpdevice_id = get_pnpdeviceid( &desc ); rec->videoarchitecture = 2; /* Unknown */ rec->videomemorytype = 2; /* Unknown */ + wsprintfW( mode, fmtW, hres, vres, (UINT64)1 << rec->current_bitsperpixel ); + rec->videomodedescription = heap_strdupW( mode ); rec->videoprocessor = heap_strdupW( name ); if (!match_row( table, row, cond, &status )) free_row_values( table, row ); else row++; Modified: trunk/reactos/dll/win32/wbemprox/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wbemprox/query.c…
============================================================================== --- trunk/reactos/dll/win32/wbemprox/query.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wbemprox/query.c [iso-8859-1] Sat Mar 5 10:48:13 2016 @@ -18,6 +18,8 @@ #include "wbemprox_private.h" +#include <winuser.h> + HRESULT create_view( const struct property *proplist, const WCHAR *class, const struct expr *cond, struct view **ret ) { @@ -96,10 +98,31 @@ return S_OK; } -static inline BOOL is_strcmp( const struct complex_expr *expr ) -{ - return ((expr->left->type == EXPR_PROPVAL && expr->right->type == EXPR_SVAL) || - (expr->left->type == EXPR_SVAL && expr->right->type == EXPR_PROPVAL)); +static BOOL is_int( CIMTYPE type ) +{ + switch (type) + { + case CIM_SINT8: + case CIM_SINT16: + case CIM_SINT32: + case CIM_SINT64: + case CIM_UINT8: + case CIM_UINT16: + case CIM_UINT32: + case CIM_UINT64: + return TRUE; + default: + return FALSE; + } +} + +static inline BOOL is_strcmp( const struct complex_expr *expr, UINT ltype, UINT rtype ) +{ + if ((ltype == CIM_STRING || is_int( ltype )) && expr->left->type == EXPR_PROPVAL && + expr->right->type == EXPR_SVAL) return TRUE; + else if ((rtype == CIM_STRING || is_int( rtype )) && expr->right->type == EXPR_PROPVAL && + expr->left->type == EXPR_SVAL) return TRUE; + return FALSE; } static inline BOOL is_boolcmp( const struct complex_expr *expr, UINT ltype, UINT rtype ) @@ -174,6 +197,41 @@ return CIM_ILLEGAL; } +static const WCHAR *format_int( WCHAR *buf, CIMTYPE type, LONGLONG val ) +{ + static const WCHAR fmt_signedW[] = {'%','d',0}; + static const WCHAR fmt_unsignedW[] = {'%','u',0}; + static const WCHAR fmt_signed64W[] = {'%','I','6','4','d',0}; + static const WCHAR fmt_unsigned64W[] = {'%','I','6','4','u',0}; + + switch (type) + { + case CIM_SINT8: + case CIM_SINT16: + case CIM_SINT32: + sprintfW( buf, fmt_signedW, val ); + return buf; + + case CIM_UINT8: + case CIM_UINT16: + case CIM_UINT32: + sprintfW( buf, fmt_unsignedW, val ); + return buf; + + case CIM_SINT64: + wsprintfW( buf, fmt_signed64W, val ); + return buf; + + case CIM_UINT64: + wsprintfW( buf, fmt_unsigned64W, val ); + return buf; + + default: + ERR( "unhandled type %u\n", type ); + return NULL; + } +} + static HRESULT eval_binary( const struct table *table, UINT row, const struct complex_expr *expr, LONGLONG *val, UINT *type ) { @@ -190,10 +248,16 @@ if (is_boolcmp( expr, ltype, rtype )) return eval_boolcmp( expr->op, lval, rval, ltype, rtype, val ); - if (is_strcmp( expr )) - { - const WCHAR *lstr = (const WCHAR *)(INT_PTR)lval; - const WCHAR *rstr = (const WCHAR *)(INT_PTR)rval; + if (is_strcmp( expr, ltype, rtype )) + { + const WCHAR *lstr, *rstr; + WCHAR lbuf[21], rbuf[21]; + + if (is_int( ltype )) lstr = format_int( lbuf, ltype, lval ); + else lstr = (const WCHAR *)(INT_PTR)lval; + + if (is_int( rtype )) rstr = format_int( rbuf, rtype, rval ); + else rstr = (const WCHAR *)(INT_PTR)rval; return eval_strcmp( expr->op, lstr, rstr, val ); } @@ -767,7 +831,8 @@ CIMTYPE basetype = view->table->columns[column].type & CIM_TYPE_MASK; val_ptr = to_safearray( (const struct array *)(INT_PTR)val, basetype ); - if (!vartype) vartype = to_vartype( basetype ) | VT_ARRAY; + if (!val_ptr) vartype = VT_NULL; + else if (!vartype) vartype = to_vartype( basetype ) | VT_ARRAY; goto done; } switch (view->table->columns[column].type & COL_TYPE_MASK) Modified: trunk/reactos/dll/win32/wbemprox/wql.tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wbemprox/wql.tab…
============================================================================== --- trunk/reactos/dll/win32/wbemprox/wql.tab.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wbemprox/wql.tab.c [iso-8859-1] Sat Mar 5 10:48:13 2016 @@ -2221,15 +2221,13 @@ return 1; case '\"': case '\'': + for (i = 1; s[i]; i++) { - for (i = 1; s[i]; i++) - { - if (s[i] == s[0]) break; - } - if (s[i]) i++; - *token = TK_STRING; - return i; - } + if (s[i] == s[0]) break; + } + if (s[i]) i++; + *token = TK_STRING; + return i; case '.': if (!isdigitW( s[1] )) { Modified: trunk/reactos/dll/win32/wbemprox/wql.y URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wbemprox/wql.y?r…
============================================================================== --- trunk/reactos/dll/win32/wbemprox/wql.y [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wbemprox/wql.y [iso-8859-1] Sat Mar 5 10:48:13 2016 @@ -647,15 +647,13 @@ return 1; case '\"': case '\'': - { - for (i = 1; s[i]; i++) - { - if (s[i] == s[0]) break; - } - if (s[i]) i++; - *token = TK_STRING; - return i; - } + for (i = 1; s[i]; i++) + { + if (s[i] == s[0]) break; + } + if (s[i]) i++; + *token = TK_STRING; + return i; case '.': if (!isdigitW( s[1] )) { Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Mar 5 10:48:13 2016 @@ -199,7 +199,7 @@ reactos/dll/win32/version # Synced to WineStaging-1.9.4 reactos/dll/win32/vssapi # Synced to WineStaging-1.7.55 reactos/dll/win32/wbemdisp # Synced to WineStaging-1.9.4 -reactos/dll/win32/wbemprox # Synced to WineStaging-1.7.55 +reactos/dll/win32/wbemprox # Synced to WineStaging-1.9.4 reactos/dll/win32/windowscodecs # Synced to WineStaging-1.7.55 reactos/dll/win32/windowscodecsext # Synced to WineStaging-1.7.55 reactos/dll/win32/winemp3.acm # Synced to WineStaging-1.7.55
8 years, 9 months
1
0
0
0
[akhaldi] 70941: [VERSION] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:33:17 2016 New Revision: 70941 URL:
http://svn.reactos.org/svn/reactos?rev=70941&view=rev
Log: [VERSION] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/version/version.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/version/version.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/version.…
============================================================================== --- trunk/reactos/dll/win32/version/version.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/version/version.c [iso-8859-1] Sat Mar 5 10:33:17 2016 @@ -1199,7 +1199,6 @@ GetSystemDirectoryA(systemDir, sizeof(systemDir)); curDir = ""; - destDir = ""; if(flags & VFFF_ISSHAREDFILE) { @@ -1296,7 +1295,6 @@ GetSystemDirectoryW(systemDir, sizeof(systemDir)/sizeof(WCHAR)); curDir = &emptyW; - destDir = &emptyW; if(flags & VFFF_ISSHAREDFILE) { Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Mar 5 10:33:17 2016 @@ -196,7 +196,7 @@ reactos/dll/win32/usp10 # Synced to WineStaging-1.9.4 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to WineStaging-1.7.55 -reactos/dll/win32/version # Synced to WineStaging-1.7.55 +reactos/dll/win32/version # Synced to WineStaging-1.9.4 reactos/dll/win32/vssapi # Synced to WineStaging-1.7.55 reactos/dll/win32/wbemdisp # Synced to WineStaging-1.7.55 reactos/dll/win32/wbemprox # Synced to WineStaging-1.7.55
8 years, 9 months
1
0
0
0
[akhaldi] 70940: [USP10_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:30:57 2016 New Revision: 70940 URL:
http://svn.reactos.org/svn/reactos?rev=70940&view=rev
Log: [USP10_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/usp10/usp10.c Modified: trunk/rostests/winetests/usp10/usp10.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/usp10/usp10.c?r…
============================================================================== --- trunk/rostests/winetests/usp10/usp10.c [iso-8859-1] (original) +++ trunk/rostests/winetests/usp10/usp10.c [iso-8859-1] Sat Mar 5 10:30:57 2016 @@ -35,14 +35,15 @@ #include <usp10.h> typedef struct _itemTest { - char todo_flag[5]; + char todo_flag[6]; int iCharPos; int fRTL; int fLayoutRTL; int uBidiLevel; + int fOverrideDirection; ULONG scriptTag; BOOL isBroken; - int broken_value[5]; + int broken_value[6]; } itemTest; typedef struct _shapeTest_char { @@ -87,38 +88,28 @@ winetest_win_skip("This test broken on this platform\n"); return; } - if (nItemsToDo) - todo_wine winetest_ok(outnItems == nItems, "Wrong number of items\n"); - else + todo_wine_if (nItemsToDo) winetest_ok(outnItems == nItems, "Wrong number of items\n"); for (x = 0; x <= outnItems; x++) { if (items[x].isBroken && broken(outpItems[x].iCharPos == items[x].broken_value[0])) winetest_win_skip("This test broken on this platform\n"); - else if (items[x].todo_flag[0]) - todo_wine winetest_ok(outpItems[x].iCharPos == items[x].iCharPos, "%i:Wrong CharPos\n",x); - else + else todo_wine_if (items[x].todo_flag[0]) winetest_ok(outpItems[x].iCharPos == items[x].iCharPos, "%i:Wrong CharPos (%i)\n",x,outpItems[x].iCharPos); if (items[x].isBroken && broken(outpItems[x].a.fRTL== items[x].broken_value[1])) winetest_win_skip("This test broken on this platform\n"); - else if (items[x].todo_flag[1]) - todo_wine winetest_ok(outpItems[x].a.fRTL == items[x].fRTL, "%i:Wrong fRTL\n",x); - else + else todo_wine_if (items[x].todo_flag[1]) winetest_ok(outpItems[x].a.fRTL == items[x].fRTL, "%i:Wrong fRTL(%i)\n",x,outpItems[x].a.fRTL); if (items[x].isBroken && broken(outpItems[x].a.fLayoutRTL == items[x].broken_value[2])) winetest_win_skip("This test broken on this platform\n"); - else if (items[x].todo_flag[2]) - todo_wine winetest_ok(outpItems[x].a.fLayoutRTL == items[x].fLayoutRTL, "%i:Wrong fLayoutRTL\n",x); - else + else todo_wine_if (items[x].todo_flag[2]) winetest_ok(outpItems[x].a.fLayoutRTL == items[x].fLayoutRTL, "%i:Wrong fLayoutRTL(%i)\n",x,outpItems[x].a.fLayoutRTL); if (items[x].isBroken && broken(outpItems[x].a.s.uBidiLevel == items[x].broken_value[3])) winetest_win_skip("This test broken on this platform\n"); - else if (items[x].todo_flag[3]) - todo_wine winetest_ok(outpItems[x].a.s.uBidiLevel == items[x].uBidiLevel, "%i:Wrong BidiLevel\n",x); - else + else todo_wine_if (items[x].todo_flag[3]) winetest_ok(outpItems[x].a.s.uBidiLevel == items[x].uBidiLevel, "%i:Wrong BidiLevel(%i)\n",x,outpItems[x].a.s.uBidiLevel); if (x != outnItems) winetest_ok(outpItems[x].a.eScript != SCRIPT_UNDEFINED, "%i: Undefined script\n",x); @@ -126,11 +117,14 @@ { if (items[x].isBroken && broken(tags[x] == items[x].broken_value[4])) winetest_win_skip("This test broken on this platform\n"); - else if (items[x].todo_flag[4]) - todo_wine winetest_ok(tags[x] == items[x].scriptTag,"%i:Incorrect Script Tag %x != %x\n",x,tags[x],items[x].scriptTag); - else + else todo_wine_if (items[x].todo_flag[4]) winetest_ok(tags[x] == items[x].scriptTag,"%i:Incorrect Script Tag %x != %x\n",x,tags[x],items[x].scriptTag); } + + if (items[x].isBroken && broken(outpItems[x].a.s.fOverrideDirection == items[x].broken_value[5])) + winetest_win_skip("This test broken on this platform\n"); + else todo_wine_if (items[x].todo_flag[5]) + winetest_ok(outpItems[x].a.s.fOverrideDirection == items[x].fOverrideDirection, "%i:Wrong fOverrideDirection(%i)\n",x,outpItems[x].a.s.fOverrideDirection); } } @@ -182,42 +176,62 @@ static void test_ScriptItemize( void ) { static const WCHAR test1[] = {'t', 'e', 's', 't',0}; - static const itemTest t11[2] = {{{0,0,0,0,0},0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1}}; - static const itemTest t12[2] = {{{0,0,0,0,0},0,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; + static const itemTest t11[2] = {{{0,0,0,0,0,0},0,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1}}; + static const itemTest t12[2] = {{{0,0,0,0,0,0},0,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; static const WCHAR test1b[] = {' ', ' ', ' ', ' ',0}; - static const itemTest t1b1[2] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; - static const itemTest t1b2[2] = {{{0,0,0,0,0},0,1,1,1,0,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; + static const itemTest t1b1[2] = {{{0,0,0,0,0,0},0,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; + static const itemTest t1b2[2] = {{{0,0,0,0,0,0},0,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; static const WCHAR test1c[] = {' ', ' ', ' ', '1', '2', ' ',0}; - static const itemTest t1c1[2] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t1c2[4] = {{{0,0,0,0,0},0,1,1,1,0,FALSE},{{0,0,0,0,0},3,0,1,2,0,FALSE},{{0,0,0,0,0},5,1,1,1,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t1c1[2] = {{{0,0,0,0,0,0},0,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t1c2[4] = {{{0,0,0,0,0,0},0,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},3,0,1,2,0,0,FALSE},{{0,0,0,0,0,0},5,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; /* Arabic, English*/ static const WCHAR test2[] = {'1','2','3','-','5','2',0x064a,0x064f,0x0633,0x0627,0x0648,0x0650,0x064a,'7','1','.',0}; - static const itemTest t21[7] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},3,0,0,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,0,FALSE},{{0,0,0,0,0},6,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},13,0,0,0,0,FALSE},{{0,0,0,0,0},15,0,0,0,0,FALSE},{{0,0,0,0,0},16,0,0,0,-1,FALSE}}; - static const itemTest t22[5] = {{{0,0,0,0,0},0,0,0,2,0,FALSE},{{0,0,0,0,0},6,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},13,0,1,2,0,FALSE},{{0,0,0,0,0},15,0,0,0,0,FALSE},{{0,0,0,0,0},16,0,0,0,-1,FALSE}}; - static const itemTest t23[5] = {{{0,0,0,0,0},0,0,1,2,0,FALSE},{{0,0,0,0,0},6,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},13,0,1,2,0,FALSE},{{0,0,0,0,0},15,1,1,1,0,FALSE},{{0,0,0,0,0},16,0,0,0,-1,FALSE}}; + static const itemTest t21[7] = {{{0,0,0,0,0,0},0,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},6,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},15,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},16,0,0,0,0,-1,FALSE}}; + static const itemTest t22[5] = {{{0,0,0,0,0,0},0,0,0,2,0,0,FALSE},{{0,0,0,0,0,0},6,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,1,2,0,0,FALSE},{{0,0,0,0,0,0},15,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},16,0,0,0,0,-1,FALSE}}; + static const itemTest t23[5] = {{{0,0,0,0,0,0},0,0,1,2,0,0,FALSE},{{0,0,0,0,0,0},6,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,1,2,0,0,FALSE},{{0,0,0,0,0,0},15,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},16,0,0,0,0,-1,FALSE}}; + static const itemTest t24[5] = {{{0,0,0,0,0,0},0,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},6,0,0,0,1,arab_tag,FALSE}, + {{0,0,0,0,0,0},13,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},15,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},16,0,0,0,0,-1,FALSE}}; static const WCHAR test2b[] = {'A','B','C','-','D','E','F',' ',0x0621,0x0623,0x0624,0}; - static const itemTest t2b1[5] = {{{0,0,0,0,0},0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},3,0,0,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},8,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; - static const itemTest t2b2[5] = {{{0,0,0,0,0},0,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},3,0,0,2,0,FALSE},{{0,0,0,0,0},4,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},7,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; - static const itemTest t2b3[3] = {{{0,0,0,0,0},0,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},7,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; + static const itemTest t2b1[5] = {{{0,0,0,0,0,0},0,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},8,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2b2[5] = {{{0,0,0,0,0,0},0,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},3,0,0,2,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2b3[3] = {{{0,0,0,0,0,0},0,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2b4[5] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},3,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},8,0,0,0,1,arab_tag,FALSE}, + {{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; static const int b2[2] = {4,4}; /* leading space */ static const WCHAR test2c[] = {' ',0x0621,0x0623,0x0624,'A','B','C','-','D','E','F',0}; - static const itemTest t2c1[5] = {{{0,0,0,0,0},0,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},4,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},7,0,0,0,0,FALSE},{{0,0,0,0,0},8,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; - static const itemTest t2c2[6] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},1,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},4,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},7,0,0,0,0,FALSE},{{0,0,0,0,0},8,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; - static const itemTest t2c3[5] = {{{0,0,0,0,0},0,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},4,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},7,0,0,2,0,FALSE},{{0,0,0,0,0},8,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; - static const itemTest t2c4[3] = {{{0,0,0,0,0},0,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},4,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; + static const itemTest t2c1[5] = {{{0,0,0,0,0,0},0,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2c2[6] = {{{0,0,0,0,0,0},0,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},1,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2c3[5] = {{{0,0,0,0,0,0},0,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},4,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,0,0,2,0,0,FALSE},{{0,0,0,0,0,0},8,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2c4[3] = {{{0,0,0,0,0,0},0,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},4,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2c5[5] = {{{0,0,0,0,0,0},0,0,0,0,1,arab_tag,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},7,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},8,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; /* trailing space */ static const WCHAR test2d[] = {'A','B','C','-','D','E','F',0x0621,0x0623,0x0624,' ',0}; - static const itemTest t2d1[5] = {{{0,0,0,0,0},0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},3,0,0,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},7,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; - static const itemTest t2d2[6] = {{{0,0,0,0,0},0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},3,0,0,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},7,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},10,0,0,0,0,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; - static const itemTest t2d3[5] = {{{0,0,0,0,0},0,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},3,0,0,2,0,FALSE},{{0,0,0,0,0},4,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},7,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; - static const itemTest t2d4[3] = {{{0,0,0,0,0},0,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},7,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},11,0,0,0,-1,FALSE}}; + static const itemTest t2d1[5] = {{{0,0,0,0,0,0},0,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2d2[6] = {{{0,0,0,0,0,0},0,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},10,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2d3[5] = {{{0,0,0,0,0,0},0,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},3,0,0,2,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; + static const itemTest t2d4[3] = {{{0,0,0,0,0,0},0,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},7,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; +static const itemTest t2d5[5] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},3,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},7,0,0,0,1,arab_tag,FALSE}, + {{0,0,0,0,0,0},11,0,0,0,0,-1,FALSE}}; /* Thai */ static const WCHAR test3[] = @@ -226,14 +240,14 @@ ,0x0e04,0x0e27,0x0e32,0x0e21,0x0e2a, 0x0e33,0x0e40,0x0e23,0x0e47,0x0e08, 0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e19,0x0e31,0x0e48,0x0e19,0}; - static const itemTest t31[2] = {{{0,0,0,0,0},0,0,0,0,thai_tag,FALSE},{{0,0,0,0,0},41,0,0,0,-1,FALSE}}; - static const itemTest t32[2] = {{{0,0,0,0,0},0,0,0,2,thai_tag,FALSE},{{0,0,0,0,0},41,0,0,0,-1,FALSE}}; + static const itemTest t31[2] = {{{0,0,0,0,0,0},0,0,0,0,0,thai_tag,FALSE},{{0,0,0,0,0,0},41,0,0,0,0,-1,FALSE}}; + static const itemTest t32[2] = {{{0,0,0,0,0,0},0,0,0,2,0,thai_tag,FALSE},{{0,0,0,0,0,0},41,0,0,0,0,-1,FALSE}}; static const WCHAR test4[] = {'1','2','3','-','5','2',' ','i','s',' ','7','1','.',0}; - static const itemTest t41[6] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},3,0,0,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,0,FALSE},{{0,0,0,0,0},7,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},10,0,0,0,0,FALSE},{{0,0,0,0,0},12,0,0,0,-1,FALSE}}; - static const itemTest t42[5] = {{{0,0,0,0,0},0,0,1,2,0,FALSE},{{0,0,0,0,0},6,1,1,1,0,FALSE},{{0,0,0,0,0},7,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},10,0,0,2,0,FALSE},{{0,0,0,0,0},12,0,0,0,-1,FALSE}}; - static const itemTest t43[4] = {{{0,0,0,0,0},0,0,1,2,0,FALSE},{{0,0,0,0,0},6,1,1,1,0,FALSE},{{0,0,0,0,0},7,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},12,0,0,0,-1,FALSE}}; + static const itemTest t41[6] = {{{0,0,0,0,0,0},0,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},7,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},10,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},12,0,0,0,0,-1,FALSE}}; + static const itemTest t42[5] = {{{0,0,0,0,0,0},0,0,1,2,0,0,FALSE},{{0,0,0,0,0,0},6,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},7,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},10,0,0,2,0,0,FALSE},{{0,0,0,0,0,0},12,0,0,0,0,-1,FALSE}}; + static const itemTest t43[4] = {{{0,0,0,0,0,0},0,0,1,2,0,0,FALSE},{{0,0,0,0,0,0},6,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},7,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},12,0,0,0,0,-1,FALSE}}; static const int b43[2] = {4,4}; /* Arabic */ @@ -242,222 +256,315 @@ 0x0627,0x062c,0x064c,' ',0x0639,0x064e,0x0644,0x0649,' ', 0x0631,0x064f,0x0624,0x0648,0x0633,0x0650,' ',0x0627,0x0644 ,0x0623,0x0635,0x0650,0x062d,0x0651,0x064e,0x0627,0x0621,0x0650,0}; - static const itemTest t51[2] = {{{0,0,0,0,0},0,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},38,0,0,0,-1,FALSE}}; + static const itemTest t51[2] = {{{0,0,0,0,0,0},0,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},38,0,0,0,0,-1,FALSE}}; + static const itemTest t52[2] = {{{0,0,0,0,0,0},0,0,0,0,1,arab_tag,FALSE}, + {{0,0,0,0,0,0},38,0,0,0,0,-1,FALSE}}; + /* Hebrew */ static const WCHAR test6[] = {0x05e9, 0x05dc, 0x05d5, 0x05dd, '.',0}; - static const itemTest t61[3] = {{{0,0,0,0,0},0,1,1,1,hebr_tag,TRUE,{-1,0,0,0,-1}},{{0,0,0,0,0},4,0,0,0,0,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t62[3] = {{{0,0,0,0,0},0,1,1,1,hebr_tag,FALSE},{{0,0,0,0,0},4,1,1,1,0,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t63[2] = {{{0,0,0,0,0},0,1,1,1,hebr_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; + static const itemTest t61[3] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,TRUE,{-1,0,0,0,-1}},{{0,0,0,0,0,0},4,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t62[3] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE},{{0,0,0,0,0,0},4,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t63[2] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; +static const itemTest t64[3] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const int b63[2] = {2,2}; static const WCHAR test7[] = {'p','a','r','t',' ','o','n','e',' ',0x05d7, 0x05dc, 0x05e7, ' ', 0x05e9, 0x05ea, 0x05d9, 0x05d9, 0x05dd, ' ','p','a','r','t',' ','t','h','r','e','e', 0}; - static const itemTest t71[4] = {{{0,0,0,0,0},0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},9,1,1,1,hebr_tag,TRUE,{-1,0,0,0,-1}},{{0,0,0,0,0},19,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},29,0,0,0,-1,FALSE}}; - static const itemTest t72[4] = {{{0,0,0,0,0},0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},9,1,1,1,hebr_tag,FALSE},{{0,0,0,0,0},18,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},29,0,0,0,-1,FALSE}}; - static const itemTest t73[4] = {{{0,0,0,0,0},0,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},8,1,1,1,hebr_tag,FALSE},{{0,0,0,0,0},19,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},29,0,0,0,-1,FALSE}}; + static const itemTest t71[4] = {{{0,0,0,0,0,0},0,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},9,1,1,1,0,hebr_tag,TRUE,{-1,0,0,0,-1}},{{0,0,0,0,0,0},19,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},29,0,0,0,0,-1,FALSE}}; + static const itemTest t72[4] = {{{0,0,0,0,0,0},0,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},9,1,1,1,0,hebr_tag,FALSE},{{0,0,0,0,0,0},18,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},29,0,0,0,0,-1,FALSE}}; + static const itemTest t73[4] = {{{0,0,0,0,0,0},0,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},8,1,1,1,0,hebr_tag,FALSE},{{0,0,0,0,0,0},19,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},29,0,0,0,0,-1,FALSE}}; +static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},9,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},19,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},29,0,0,0,0,-1,FALSE}}; + static const WCHAR test8[] = {0x0633, 0x0644, 0x0627, 0x0645,0}; - static const itemTest t81[2] = {{{0,0,0,0,0},0,1,1,1,arab_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; + static const itemTest t81[2] = {{{0,0,0,0,0,0},0,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; + static const itemTest t82[2] = {{{0,0,0,0,0,0},0,0,0,0,1,arab_tag,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; /* Syriac (Like Arabic )*/ static const WCHAR test9[] = {0x0710, 0x0712, 0x0712, 0x0714, '.',0}; - static const itemTest t91[3] = {{{0,0,0,0,0},0,1,1,1,syrc_tag,FALSE},{{0,0,0,0,0},4,0,0,0,0,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t92[3] = {{{0,0,0,0,0},0,1,1,1,syrc_tag},{{0,0,0,0,0},4,1,1,1,0,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t93[2] = {{{0,0,0,0,0},0,1,1,1,syrc_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; + static const itemTest t91[3] = {{{0,0,0,0,0,0},0,1,1,1,0,syrc_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t92[3] = {{{0,0,0,0,0,0},0,1,1,1,0,syrc_tag},{{0,0,0,0,0,0},4,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t93[2] = {{{0,0,0,0,0,0},0,1,1,1,0,syrc_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t94[3] = {{{0,0,0,0,0,0},0,0,0,0,1,syrc_tag,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; static const int b93[2] = {2,2}; static const WCHAR test10[] = {0x0717, 0x0718, 0x071a, 0x071b,0}; - static const itemTest t101[2] = {{{0,0,0,0,0},0,1,1,1,syrc_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; + static const itemTest t101[2] = {{{0,0,0,0,0,0},0,1,1,1,0,syrc_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; + static const itemTest t102[2] = {{{0,0,0,0,0,0},0,0,0,0,1,syrc_tag,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; /* Devanagari */ static const WCHAR test11[] = {0x0926, 0x0947, 0x0935, 0x0928, 0x093e, 0x0917, 0x0930, 0x0940}; - static const itemTest t111[2] = {{{0,0,0,0,0},0,0,0,0,deva_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}}; - static const itemTest t112[2] = {{{0,0,0,0,0},0,0,0,2,deva_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}}; + static const itemTest t111[2] = {{{0,0,0,0,0,0},0,0,0,0,0,deva_tag,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; + static const itemTest t112[2] = {{{0,0,0,0,0,0},0,0,0,2,0,deva_tag,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; /* Bengali */ static const WCHAR test12[] = {0x09ac, 0x09be, 0x0982, 0x09b2, 0x09be}; - static const itemTest t121[2] = {{{0,0,0,0,0},0,0,0,0,beng_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t122[2] = {{{0,0,0,0,0},0,0,0,2,beng_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; + static const itemTest t121[2] = {{{0,0,0,0,0,0},0,0,0,0,0,beng_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t122[2] = {{{0,0,0,0,0,0},0,0,0,2,0,beng_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; /* Gurmukhi */ static const WCHAR test13[] = {0x0a17, 0x0a41, 0x0a30, 0x0a2e, 0x0a41, 0x0a16, 0x0a40}; - static const itemTest t131[2] = {{{0,0,0,0,0},0,0,0,0,guru_tag,FALSE},{{0,0,0,0,0},7,0,0,0,-1,FALSE}}; - static const itemTest t132[2] = {{{0,0,0,0,0},0,0,0,2,guru_tag,FALSE},{{0,0,0,0,0},7,0,0,0,-1,FALSE}}; + static const itemTest t131[2] = {{{0,0,0,0,0,0},0,0,0,0,0,guru_tag,FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const itemTest t132[2] = {{{0,0,0,0,0,0},0,0,0,2,0,guru_tag,FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; /* Gujarati */ static const WCHAR test14[] = {0x0a97, 0x0ac1, 0x0a9c, 0x0ab0, 0x0abe, 0x0aa4, 0x0ac0}; - static const itemTest t141[2] = {{{0,0,0,0,0},0,0,0,0,gujr_tag,FALSE},{{0,0,0,0,0},7,0,0,0,-1,FALSE}}; - static const itemTest t142[2] = {{{0,0,0,0,0},0,0,0,2,gujr_tag,FALSE},{{0,0,0,0,0},7,0,0,0,-1,FALSE}}; + static const itemTest t141[2] = {{{0,0,0,0,0,0},0,0,0,0,0,gujr_tag,FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const itemTest t142[2] = {{{0,0,0,0,0,0},0,0,0,2,0,gujr_tag,FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; /* Oriya */ static const WCHAR test15[] = {0x0b13, 0x0b21, 0x0b3c, 0x0b3f, 0x0b06}; - static const itemTest t151[2] = {{{0,0,0,0,0},0,0,0,0,orya_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t152[2] = {{{0,0,0,0,0},0,0,0,2,orya_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; + static const itemTest t151[2] = {{{0,0,0,0,0,0},0,0,0,0,0,orya_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t152[2] = {{{0,0,0,0,0,0},0,0,0,2,0,orya_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; /* Tamil */ static const WCHAR test16[] = {0x0ba4, 0x0bae, 0x0bbf, 0x0bb4, 0x0bcd}; - static const itemTest t161[2] = {{{0,0,0,0,0},0,0,0,0,taml_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t162[2] = {{{0,0,0,0,0},0,0,0,2,taml_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; + static const itemTest t161[2] = {{{0,0,0,0,0,0},0,0,0,0,0,taml_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t162[2] = {{{0,0,0,0,0,0},0,0,0,2,0,taml_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; /* Telugu */ static const WCHAR test17[] = {0x0c24, 0x0c46, 0x0c32, 0x0c41, 0x0c17, 0x0c41}; - static const itemTest t171[2] = {{{0,0,0,0,0},0,0,0,0,telu_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t172[2] = {{{0,0,0,0,0},0,0,0,2,telu_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t171[2] = {{{0,0,0,0,0,0},0,0,0,0,0,telu_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t172[2] = {{{0,0,0,0,0,0},0,0,0,2,0,telu_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; /* Kannada */ static const WCHAR test18[] = {0x0c95, 0x0ca8, 0x0ccd, 0x0ca8, 0x0ca1}; - static const itemTest t181[2] = {{{0,0,0,0,0},0,0,0,0,knda_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t182[2] = {{{0,0,0,0,0},0,0,0,2,knda_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; + static const itemTest t181[2] = {{{0,0,0,0,0,0},0,0,0,0,0,knda_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t182[2] = {{{0,0,0,0,0,0},0,0,0,2,0,knda_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; /* Malayalam */ static const WCHAR test19[] = {0x0d2e, 0x0d32, 0x0d2f, 0x0d3e, 0x0d33, 0x0d02}; - static const itemTest t191[2] = {{{0,0,0,0,0},0,0,0,0,mlym_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t192[2] = {{{0,0,0,0,0},0,0,0,2,mlym_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t191[2] = {{{0,0,0,0,0,0},0,0,0,0,0,mlym_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t192[2] = {{{0,0,0,0,0,0},0,0,0,2,0,mlym_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; /* Diacritical */ static const WCHAR test20[] = {0x0309,'a','b','c','d',0}; - static const itemTest t201[3] = {{{0,0,0,0,0},0,0,0,0,0x0,FALSE},{{0,0,0,0,0},1,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; - static const itemTest t202[3] = {{{0,0,0,0,0},0,0,0,2,0,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},1,0,0,2,latn_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; + static const itemTest t201[3] = {{{0,0,0,0,0,0},0,0,0,0,0x0,0,FALSE},{{0,0,0,0,0,0},1,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t202[3] = {{{0,0,0,0,0,0},0,0,0,2,0,0,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},1,0,0,2,0,latn_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; static const WCHAR test21[] = {0x0710, 0x0712, 0x0308, 0x0712, 0x0714,0}; - static const itemTest t211[2] = {{{0,0,0,0,0},0,1,1,1,syrc_tag,FALSE},{{0,0,0,0,0},5,0,0,0,-1,FALSE}}; + static const itemTest t211[2] = {{{0,0,0,0,0,0},0,1,1,1,0,syrc_tag,FALSE},{{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; + static const itemTest t212[2] = {{{0,0,0,0,0,0},0,0,0,0,1,syrc_tag,FALSE}, + {{0,0,0,0,0,0},5,0,0,0,0,-1,FALSE}}; /* Latin Punctuation */ static const WCHAR test22[] = {'#','$',',','!','\"','*',0}; - static const itemTest t221[3] = {{{0,0,0,0,0},0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},3,0,0,0,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t222[3] = {{{0,0,0,0,0},0,1,1,1,latn_tag,FALSE},{{0,0,0,0,0},3,1,1,1,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t223[2] = {{{0,0,0,0,0},0,1,1,1,latn_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t221[3] = {{{0,0,0,0,0,0},0,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t222[3] = {{{0,0,0,0,0,0},0,1,1,1,0,latn_tag,FALSE},{{0,0,0,0,0,0},3,1,1,1,0,0,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t223[2] = {{{0,0,0,0,0,0},0,1,1,1,0,latn_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; static const int b222[2] = {1,1}; static const int b223[2] = {2,2}; /* Number 2*/ static const WCHAR test23[] = {'1','2','3',0x00b2,0x00b3,0x2070,0}; - static const itemTest t231[3] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},3,0,0,0,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t232[3] = {{{0,0,0,0,0},0,0,1,2,0,FALSE},{{0,0,0,0,0},3,0,1,2,0,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t231[3] = {{{0,0,0,0,0,0},0,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t232[3] = {{{0,0,0,0,0,0},0,0,1,2,0,0,FALSE},{{0,0,0,0,0,0},3,0,1,2,0,0,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; /* Myanmar */ static const WCHAR test24[] = {0x1019,0x103c,0x1014,0x103a,0x1019,0x102c,0x1021,0x1000,0x1039,0x1001,0x101b,0x102c}; - static const itemTest t241[2] = {{{0,0,0,0,0},0,0,0,0,mymr_tag,FALSE},{{0,0,0,0,0},12,0,0,0,-1,FALSE}}; - static const itemTest t242[2] = {{{0,0,0,0,0},0,0,0,2,mymr_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},12,0,0,0,-1,FALSE}}; + static const itemTest t241[2] = {{{0,0,0,0,0,0},0,0,0,0,0,mymr_tag,FALSE},{{0,0,0,0,0,0},12,0,0,0,0,-1,FALSE}}; + static const itemTest t242[2] = {{{0,0,0,0,0,0},0,0,0,2,0,mymr_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},12,0,0,0,0,-1,FALSE}}; /* Tai Le */ static const WCHAR test25[] = {0x1956,0x196d,0x1970,0x1956,0x196c,0x1973,0x1951,0x1968,0x1952,0x1970}; - static const itemTest t251[2] = {{{0,0,0,0,0},0,0,0,0,tale_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0},10,0,0,0,-1,FALSE}}; - static const itemTest t252[2] = {{{0,0,0,0,0},0,0,0,2,tale_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0},10,0,0,0,-1,FALSE}}; + static const itemTest t251[2] = {{{0,0,0,0,0,0},0,0,0,0,0,tale_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0,0},10,0,0,0,0,-1,FALSE}}; + static const itemTest t252[2] = {{{0,0,0,0,0,0},0,0,0,2,0,tale_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0,0},10,0,0,0,0,-1,FALSE}}; /* New Tai Lue */ static const WCHAR test26[] = {0x1992,0x19c4}; - static const itemTest t261[2] = {{{0,0,0,0,0},0,0,0,0,talu_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0},2,0,0,0,-1,FALSE}}; - static const itemTest t262[2] = {{{0,0,0,0,0},0,0,0,2,talu_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0},2,0,0,0,-1,FALSE}}; + static const itemTest t261[2] = {{{0,0,0,0,0,0},0,0,0,0,0,talu_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0,0},2,0,0,0,0,-1,FALSE}}; + static const itemTest t262[2] = {{{0,0,0,0,0,0},0,0,0,2,0,talu_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0,0},2,0,0,0,0,-1,FALSE}}; /* Khmer */ static const WCHAR test27[] = {0x1781,0x17c1,0x1798,0x179a,0x1797,0x17b6,0x179f,0x17b6}; - static const itemTest t271[2] = {{{0,0,0,0,0},0,0,0,0,khmr_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}}; - static const itemTest t272[2] = {{{0,0,0,0,0},0,0,0,2,khmr_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},8,0,0,0,-1,FALSE}}; + static const itemTest t271[2] = {{{0,0,0,0,0,0},0,0,0,0,0,khmr_tag,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; + static const itemTest t272[2] = {{{0,0,0,0,0,0},0,0,0,2,0,khmr_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; /* CJK Han */ static const WCHAR test28[] = {0x8bed,0x7d20,0x6587,0x5b57}; - static const itemTest t281[2] = {{{0,0,0,0,0},0,0,0,0,hani_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; - static const itemTest t282[2] = {{{0,0,0,0,0},0,0,0,2,hani_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; + static const itemTest t281[2] = {{{0,0,0,0,0,0},0,0,0,0,0,hani_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; + static const itemTest t282[2] = {{{0,0,0,0,0,0},0,0,0,2,0,hani_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; /* Ideographic */ static const WCHAR test29[] = {0x2ff0,0x2ff3,0x2ffb,0x2ff0,0x65e5,0x65e5,0x5de5,0x7f51,0x4e02,0x4e5e}; - static const itemTest t291[3] = {{{0,0,0,0,0},0,0,0,0,hani_tag,FALSE},{{0,0,0,0,0},4,0,0,0,hani_tag,FALSE},{{0,0,0,0,0},10,0,0,0,-1,FALSE}}; - static const itemTest t292[3] = {{{0,0,0,0,0},0,1,1,1,hani_tag,FALSE},{{0,0,0,0,0},4,0,0,2,hani_tag,FALSE},{{0,0,0,0,0},10,0,0,0,-1,FALSE}}; + static const itemTest t291[3] = {{{0,0,0,0,0,0},0,0,0,0,0,hani_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,hani_tag,FALSE},{{0,0,0,0,0,0},10,0,0,0,0,-1,FALSE}}; + static const itemTest t292[3] = {{{0,0,0,0,0,0},0,1,1,1,0,hani_tag,FALSE},{{0,0,0,0,0,0},4,0,0,2,0,hani_tag,FALSE},{{0,0,0,0,0,0},10,0,0,0,0,-1,FALSE}}; /* Bopomofo */ static const WCHAR test30[] = {0x3113,0x3128,0x3127,0x3123,0x3108,0x3128,0x310f,0x3120}; - static const itemTest t301[2] = {{{0,0,0,0,0},0,0,0,0,bopo_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}}; - static const itemTest t302[2] = {{{0,0,0,0,0},0,0,0,2,bopo_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}}; + static const itemTest t301[2] = {{{0,0,0,0,0,0},0,0,0,0,0,bopo_tag,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; + static const itemTest t302[2] = {{{0,0,0,0,0,0},0,0,0,2,0,bopo_tag,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; /* Kana */ static const WCHAR test31[] = {0x3072,0x3089,0x304b,0x306a,0x30ab,0x30bf,0x30ab,0x30ca}; - static const itemTest t311[2] = {{{0,0,0,0,0},0,0,0,0,kana_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}}; - static const itemTest t312[2] = {{{0,0,0,0,0},0,0,0,2,kana_tag,FALSE},{{0,0,0,0,0},8,0,0,0,-1,FALSE}}; + static const itemTest t311[2] = {{{0,0,0,0,0,0},0,0,0,0,0,kana_tag,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; + static const itemTest t312[2] = {{{0,0,0,0,0,0},0,0,0,2,0,kana_tag,FALSE},{{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; static const int b311[2] = {2,2}; static const int b312[2] = {2,2}; /* Hangul */ static const WCHAR test32[] = {0xd55c,0xad6d,0xc5b4}; - static const itemTest t321[2] = {{{0,0,0,0,0},0,0,0,0,hang_tag,FALSE},{{0,0,0,0,0},3,0,0,0,-1,FALSE}}; - static const itemTest t322[2] = {{{0,0,0,0,0},0,0,0,2,hang_tag,FALSE},{{0,0,0,0,0},3,0,0,0,-1,FALSE}}; + static const itemTest t321[2] = {{{0,0,0,0,0,0},0,0,0,0,0,hang_tag,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,-1,FALSE}}; + static const itemTest t322[2] = {{{0,0,0,0,0,0},0,0,0,2,0,hang_tag,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,-1,FALSE}}; /* Yi */ static const WCHAR test33[] = {0xa188,0xa320,0xa071,0xa0b7}; - static const itemTest t331[2] = {{{0,0,0,0,0},0,0,0,0,yi_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; - static const itemTest t332[2] = {{{0,0,0,0,0},0,0,0,2,yi_tag,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; + static const itemTest t331[2] = {{{0,0,0,0,0,0},0,0,0,0,0,yi_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; + static const itemTest t332[2] = {{{0,0,0,0,0,0},0,0,0,2,0,yi_tag,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; /* Ethiopic */ static const WCHAR test34[] = {0x130d,0x12d5,0x12dd}; - static const itemTest t341[2] = {{{0,0,0,0,0},0,0,0,0,ethi_tag,FALSE},{{0,0,0,0,0},3,0,0,0,-1,FALSE}}; - static const itemTest t342[2] = {{{0,0,0,0,0},0,0,0,2,ethi_tag,FALSE},{{0,0,0,0,0},3,0,0,0,-1,FALSE}}; + static const itemTest t341[2] = {{{0,0,0,0,0,0},0,0,0,0,0,ethi_tag,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,-1,FALSE}}; + static const itemTest t342[2] = {{{0,0,0,0,0,0},0,0,0,2,0,ethi_tag,FALSE},{{0,0,0,0,0,0},3,0,0,0,0,-1,FALSE}}; static const int b342[2] = {2,2}; /* Mongolian */ static const WCHAR test35[] = {0x182e,0x1823,0x1829,0x182d,0x1823,0x182f,0x0020,0x182a,0x1822,0x1834,0x1822,0x182d,0x180c}; - static const itemTest t351[2] = {{{0,0,0,0,0},0,0,0,0,mong_tag,FALSE},{{0,0,0,0,0},13,0,0,0,-1,FALSE}}; - static const itemTest t352[2] = {{{0,0,0,0,0},0,0,0,2,mong_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},13,0,0,0,-1,FALSE}}; + static const itemTest t351[2] = {{{0,0,0,0,0,0},0,0,0,0,0,mong_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; static const int b351[2] = {2,2}; + static const itemTest t352[2] = {{{0,0,0,0,0,0},0,0,0,2,0,mong_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; static const int b352[2] = {2,3}; + static const itemTest t353[2] = {{{0,0,0,0,0,1},0,0,0,0,1,mong_tag,TRUE,{0,0,0,0,0}},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; /* Tifinagh */ static const WCHAR test36[] = {0x2d5c,0x2d49,0x2d3c,0x2d49,0x2d4f,0x2d30,0x2d56}; - static const itemTest t361[2] = {{{0,0,0,0,0},0,0,0,0,tfng_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0},7,0,0,0,-1,FALSE}}; - static const itemTest t362[2] = {{{0,0,0,0,0},0,0,0,2,tfng_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0},7,0,0,0,-1,FALSE}}; + static const itemTest t361[2] = {{{0,0,0,0,0,0},0,0,0,0,0,tfng_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const itemTest t362[2] = {{{0,0,0,0,0,0},0,0,0,2,0,tfng_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; /* N'Ko */ static const WCHAR test37[] = {0x07d2,0x07de,0x07cf}; - static const itemTest t371[2] = {{{0,0,0,0,0},0,1,1,1,nko_tag,TRUE,{-1,0,0,0,arab_tag}},{{0,0,0,0,0},3,0,0,0,-1,FALSE}}; - static const itemTest t372[2] = {{{0,0,0,0,0},0,1,1,1,nko_tag,TRUE,{-1,0,0,2,arab_tag}},{{0,0,0,0,0},3,0,0,0,-1,FALSE}}; + static const itemTest t371[2] = {{{0,0,0,0,0,0},0,1,1,1,0,nko_tag,TRUE,{-1,0,0,0,arab_tag,0}},{{0,0,0,0,0,0},3,0,0,0,0,-1,FALSE}}; + static const itemTest t372[2] = {{{0,0,0,0,0,0},0,1,1,1,0,nko_tag,TRUE,{-1,0,0,2,arab_tag,0}},{{0,0,0,0,0,0},3,0,0,0,0,-1,FALSE}}; + static const itemTest t373[2] = {{{0,0,0,0,0,0},0,0,0,0,1,nko_tag,TRUE,{-1,0,0,2,arab_tag,0}}, {{0,0,0,0,0,0},3,0,0,0,0,-1,FALSE}}; /* Vai */ static const WCHAR test38[] = {0xa559,0xa524}; - static const itemTest t381[2] = {{{0,0,0,0,0},0,0,0,0,vai_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0},2,0,0,0,-1,FALSE}}; - static const itemTest t382[2] = {{{0,0,0,0,0},0,0,0,2,vai_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0},2,0,0,0,-1,FALSE}}; + static const itemTest t381[2] = {{{0,0,0,0,0,0},0,0,0,0,0,vai_tag,TRUE,{-1,-1,-1,-1,latn_tag}},{{0,0,0,0,0,0},2,0,0,0,0,-1,FALSE}}; + static const itemTest t382[2] = {{{0,0,0,0,0,0},0,0,0,2,0,vai_tag,TRUE,{-1,1,1,1,latn_tag}},{{0,0,0,0,0,0},2,0,0,0,0,-1,FALSE}}; /* Cherokee */ static const WCHAR test39[] = {0x13e3,0x13b3,0x13a9,0x0020,0x13a6,0x13ec,0x13c2,0x13af,0x13cd,0x13d7}; - static const itemTest t391[2] = {{{0,0,0,0,0},0,0,0,0,cher_tag,FALSE},{{0,0,0,0,0},10,0,0,0,-1,FALSE}}; - static const itemTest t392[2] = {{{0,0,0,0,0},0,0,0,2,cher_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},10,0,0,0,-1,FALSE}}; + static const itemTest t391[2] = {{{0,0,0,0,0,0},0,0,0,0,0,cher_tag,FALSE},{{0,0,0,0,0,0},10,0,0,0,0,-1,FALSE}}; + static const itemTest t392[2] = {{{0,0,0,0,0,0},0,0,0,2,0,cher_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},10,0,0,0,0,-1,FALSE}}; /* Canadian Aboriginal Syllabics */ static const WCHAR test40[] = {0x1403,0x14c4,0x1483,0x144e,0x1450,0x1466}; - static const itemTest t401[2] = {{{0,0,0,0,0},0,0,0,0,cans_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t402[2] = {{{0,0,0,0,0},0,0,0,2,cans_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t401[2] = {{{0,0,0,0,0,0},0,0,0,0,0,cans_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t402[2] = {{{0,0,0,0,0,0},0,0,0,2,0,cans_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; /* Ogham */ static const WCHAR test41[] = {0x169b,0x1691,0x168c,0x1690,0x168b,0x169c}; - static const itemTest t411[2] = {{{0,0,0,0,0},0,0,0,0,ogam_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t412[4] = {{{0,0,0,0,0},0,1,1,1,ogam_tag,FALSE},{{0,0,0,0,0},1,0,0,2,ogam_tag,FALSE},{{0,0,0,0,0},5,1,1,1,ogam_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t411[2] = {{{0,0,0,0,0,0},0,0,0,0,0,ogam_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t412[4] = {{{0,0,0,0,0,0},0,1,1,1,0,ogam_tag,FALSE},{{0,0,0,0,0,0},1,0,0,2,0,ogam_tag,FALSE},{{0,0,0,0,0,0},5,1,1,1,0,ogam_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; static const int b412[2] = {1,1}; /* Runic */ static const WCHAR test42[] = {0x16a0,0x16a1,0x16a2,0x16a3,0x16a4,0x16a5}; - static const itemTest t421[2] = {{{0,0,0,0,0},0,0,0,0,runr_tag,FALSE},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; - static const itemTest t422[4] = {{{0,0,0,0,0},0,0,0,2,runr_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},6,0,0,0,-1,FALSE}}; + static const itemTest t421[2] = {{{0,0,0,0,0,0},0,0,0,0,0,runr_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t422[4] = {{{0,0,0,0,0,0},0,0,0,2,0,runr_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; /* Braille */ static const WCHAR test43[] = {0x280f,0x2817,0x2811,0x280d,0x280a,0x2811,0x2817}; - static const itemTest t431[2] = {{{0,0,0,0,0},0,0,0,0,brai_tag,FALSE},{{0,0,0,0,0},7,0,0,0,-1,FALSE}}; - static const itemTest t432[4] = {{{0,0,0,0,0},0,0,0,2,brai_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},7,0,0,0,-1,FALSE}}; + static const itemTest t431[2] = {{{0,0,0,0,0,0},0,0,0,0,0,brai_tag,FALSE},{{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const itemTest t432[4] = {{{0,0,0,0,0,0},0,0,0,2,0,brai_tag,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; /* Private and Surrogates Area */ static const WCHAR test44[] = {0xe000, 0xe001, 0xd800, 0xd801}; - static const itemTest t441[3] = {{{0,0,0,0,0},0,0,0,0,0,FALSE},{{0,0,0,0,0},2,0,0,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; - static const itemTest t442[4] = {{{0,0,0,0,0},0,0,0,2,0,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},2,0,0,2,0,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0},4,0,0,0,-1,FALSE}}; + static const itemTest t441[3] = {{{0,0,0,0,0,0},0,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},2,0,0,0,0,0,FALSE},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; + static const itemTest t442[4] = {{{0,0,0,0,0,0},0,0,0,2,0,0,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},2,0,0,2,0,0,TRUE,{-1,1,1,1,-1}},{{0,0,0,0,0,0},4,0,0,0,0,-1,FALSE}}; /* Deseret */ static const WCHAR test45[] = {0xd801,0xdc19,0xd801,0xdc32,0xd801,0xdc4c,0xd801,0xdc3c,0xd801,0xdc32,0xd801,0xdc4b,0xd801,0xdc2f,0xd801,0xdc4c,0xd801,0xdc3b,0xd801,0xdc32,0xd801,0xdc4a,0xd801,0xdc28}; - static const itemTest t451[2] = {{{0,0,0,0,0},0,0,0,0,dsrt_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0},24,0,0,0,-1,FALSE}}; - static const itemTest t452[2] = {{{0,0,0,0,0},0,0,0,2,dsrt_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0},24,0,0,0,-1,FALSE}}; + static const itemTest t451[2] = {{{0,0,0,0,0,0},0,0,0,0,0,dsrt_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0,0},24,0,0,0,0,-1,FALSE}}; + static const itemTest t452[2] = {{{0,0,0,0,0,0},0,0,0,2,0,dsrt_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0,0},24,0,0,0,0,-1,FALSE}}; /* Osmanya */ static const WCHAR test46[] = {0xd801,0xdc8b,0xd801,0xdc98,0xd801,0xdc88,0xd801,0xdc91,0xd801,0xdc9b,0xd801,0xdc92,0xd801,0xdc95,0xd801,0xdc80}; - static const itemTest t461[2] = {{{0,0,0,0,0},0,0,0,0,osma_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0},16,0,0,0,-1,FALSE}}; - static const itemTest t462[2] = {{{0,0,0,0,0},0,0,0,2,osma_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0},16,0,0,0,-1,FALSE}}; + static const itemTest t461[2] = {{{0,0,0,0,0,0},0,0,0,0,0,osma_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0,0},16,0,0,0,0,-1,FALSE}}; + static const itemTest t462[2] = {{{0,0,0,0,0,0},0,0,0,2,0,osma_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0,0},16,0,0,0,0,-1,FALSE}}; /* Mathematical Alphanumeric Symbols */ static const WCHAR test47[] = {0xd835,0xdc00,0xd835,0xdc35,0xd835,0xdc6a,0xd835,0xdc9f,0xd835,0xdcd4,0xd835,0xdd09,0xd835,0xdd3e,0xd835,0xdd73,0xd835,0xdda8,0xd835,0xdddd,0xd835,0xde12,0xd835,0xde47,0xd835,0xde7c}; - static const itemTest t471[2] = {{{0,0,0,0,0},0,0,0,0,math_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0},26,0,0,0,-1,FALSE}}; - static const itemTest t472[2] = {{{0,0,0,0,0},0,0,0,2,math_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0},26,0,0,0,-1,FALSE}}; + static const itemTest t471[2] = {{{0,0,0,0,0,0},0,0,0,0,0,math_tag,TRUE,{-1,-1,-1,-1,0x0}},{{0,0,0,0,0,0},26,0,0,0,0,-1,FALSE}}; + static const itemTest t472[2] = {{{0,0,0,0,0,0},0,0,0,2,0,math_tag,TRUE,{-1,1,1,1,0x0}},{{0,0,0,0,0,0},26,0,0,0,0,-1,FALSE}}; + + /* Mathematical and Numeric combinations */ + /* These have a leading hebrew character to force complicated itemization */ + static const WCHAR test48[] = {0x05e9,' ','1','2','3','.'}; + static const itemTest t481[4] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE}, + {{0,0,0,0,0},2,0,1,2,0,0,FALSE},{{0,0,0,0,0},5,0,0,0,0,0,FALSE}, + {{0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t482[4] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},2,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},5,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + + static const WCHAR test49[] = {0x05e9,' ','1','2','.','1','2'}; + static const itemTest t491[3] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE}, + {{0,0,0,0,0},2,0,1,2,0,0,FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const itemTest t492[3] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},2,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + + static const WCHAR test50[] = {0x05e9,' ','.','1','2','3'}; + static const itemTest t501[4] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE}, + {{0,0,0,0,0},2,1,1,1,0,0,FALSE},{{0,0,0,0,0},3,0,1,2,0,0,FALSE}, + {{0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + static const itemTest t502[4] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},2,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},3,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}}; + + static const WCHAR test51[] = {0x05e9,' ','a','b','.','1','2'}; + static const itemTest t511[5] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE}, + {{0,0,0,0,0},1,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},4,0,0,0,0,0,FALSE}, + {{0,0,0,0,0},5,0,0,2,0,0,FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const itemTest t512[5] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},2,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},5,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + + static const WCHAR test52[] = {0x05e9,' ','1','2','.','a','b'}; + static const itemTest t521[5] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE}, + {{0,0,0,0,0},2,0,1,2,0,0,FALSE},{{0,0,0,0,0},4,0,0,0,0,0,FALSE}, + {{0,0,0,0,0},5,0,0,0,0,latn_tag,FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const itemTest t522[5] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},2,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},5,0,0,0,1,latn_tag,FALSE}, + {{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + + static const WCHAR test53[] = {0x05e9,' ','1','2','.','.','1','2'}; + static const itemTest t531[5] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE}, + {{0,0,0,0,0},2,0,1,2,0,0,FALSE},{{0,0,0,0,0},4,1,1,1,0,0,FALSE}, + {{0,0,0,0,0},6,0,1,2,0,0,FALSE},{{0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; + static const itemTest t532[5] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},2,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},4,0,0,0,1,0,FALSE}, + {{0,0,0,0,0,0},6,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; + + static const WCHAR test54[] = {0x05e9,' ','1','2','+','1','2'}; + static const itemTest t541[3] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE}, + {{0,0,0,0,0},2,0,1,2,0,0,FALSE},{{0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const itemTest t542[3] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},2,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},7,0,0,0,0,-1,FALSE}}; + static const WCHAR test55[] = {0x05e9,' ','1','2','+','+','1','2'}; + static const itemTest t551[3] = {{{0,0,0,0,0,0},0,1,1,1,0,hebr_tag,FALSE}, + {{0,0,0,0,0},2,0,1,2,0,0,FALSE},{{0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; + static const itemTest t552[3] = {{{0,0,0,0,0,0},0,0,0,0,1,hebr_tag,FALSE}, + {{0,0,0,0,0,0},2,0,1,0,1,0,FALSE}, + {{0,0,0,0,0,0},8,0,0,0,0,-1,FALSE}}; SCRIPT_ITEM items[15]; SCRIPT_CONTROL Control; @@ -593,6 +700,14 @@ test_items_ok(test45,24,&Control,&State,1,t451,FALSE,0); test_items_ok(test46,16,&Control,&State,1,t461,FALSE,0); test_items_ok(test47,26,&Control,&State,1,t471,FALSE,0); + test_items_ok(test48,6,&Control,&State,3,t481,FALSE,0); + test_items_ok(test49,7,&Control,&State,2,t491,FALSE,0); + test_items_ok(test50,6,&Control,&State,3,t501,FALSE,0); + test_items_ok(test51,7,&Control,&State,4,t511,FALSE,0); + test_items_ok(test52,7,&Control,&State,4,t521,FALSE,0); + test_items_ok(test53,8,&Control,&State,4,t531,FALSE,0); + test_items_ok(test54,7,&Control,&State,2,t541,FALSE,0); + test_items_ok(test55,8,&Control,&State,2,t551,FALSE,0); State.uBidiLevel = 1; test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0); @@ -702,6 +817,70 @@ test_items_ok(test45,24,&Control,&State,1,t452,FALSE,0); test_items_ok(test46,16,&Control,&State,1,t462,FALSE,0); test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0); + + State.uBidiLevel = 0; + Control.fMergeNeutralItems = FALSE; + State.fOverrideDirection = 1; + test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0); + test_items_ok(test1b,4,&Control,&State,1,t1b1,FALSE,0); + test_items_ok(test1c,6,&Control,&State,1,t1c1,FALSE,0); + test_items_ok(test2,16,&Control,&State,4,t24,FALSE,0); + test_items_ok(test2b,11,&Control,&State,4,t2b4,FALSE,0); + test_items_ok(test2c,11,&Control,&State,4,t2c5,FALSE,0); + test_items_ok(test2d,11,&Control,&State,4,t2d5,FALSE,0); + test_items_ok(test3,41,&Control,&State,1,t31,FALSE,0); + test_items_ok(test4,12,&Control,&State,5,t41,FALSE,0); + test_items_ok(test5,38,&Control,&State,1,t52,FALSE,0); + test_items_ok(test6,5,&Control,&State,2,t64,FALSE,0); + test_items_ok(test7,29,&Control,&State,3,t74,FALSE,0); + test_items_ok(test8,4,&Control,&State,1,t82,FALSE,0); + test_items_ok(test9,5,&Control,&State,2,t94,FALSE,0); + test_items_ok(test10,4,&Control,&State,1,t102,FALSE,0); + test_items_ok(test11,8,&Control,&State,1,t111,FALSE,0); + test_items_ok(test12,5,&Control,&State,1,t121,FALSE,0); + test_items_ok(test13,7,&Control,&State,1,t131,FALSE,0); + test_items_ok(test14,7,&Control,&State,1,t141,FALSE,0); + test_items_ok(test15,5,&Control,&State,1,t151,FALSE,0); + test_items_ok(test16,5,&Control,&State,1,t161,FALSE,0); + test_items_ok(test17,6,&Control,&State,1,t171,FALSE,0); + test_items_ok(test18,5,&Control,&State,1,t181,FALSE,0); + test_items_ok(test19,6,&Control,&State,1,t191,FALSE,0); + test_items_ok(test20,5,&Control,&State,2,t201,FALSE,0); + test_items_ok(test21,5,&Control,&State,1,t212,FALSE,0); + test_items_ok(test22,6,&Control,&State,2,t221,FALSE,0); + test_items_ok(test23,6,&Control,&State,2,t231,FALSE,0); + test_items_ok(test24,12,&Control,&State,1,t241,FALSE,0); + test_items_ok(test25,10,&Control,&State,1,t251,FALSE,0); + test_items_ok(test26,2,&Control,&State,1,t261,FALSE,0); + test_items_ok(test27,8,&Control,&State,1,t271,FALSE,0); + test_items_ok(test28,4,&Control,&State,1,t281,FALSE,0); + test_items_ok(test29,10,&Control,&State,2,t291,FALSE,0); + test_items_ok(test30,8,&Control,&State,1,t301,FALSE,0); + test_items_ok(test31,8,&Control,&State,1,t311,FALSE,b311); + test_items_ok(test32,3,&Control,&State,1,t321,FALSE,0); + test_items_ok(test33,4,&Control,&State,1,t331,FALSE,0); + test_items_ok(test34,3,&Control,&State,1,t341,FALSE,0); + test_items_ok(test35,13,&Control,&State,1,t353,FALSE,b351); + test_items_ok(test36,7,&Control,&State,1,t361,FALSE,0); + test_items_ok(test37,3,&Control,&State,1,t373,FALSE,0); + test_items_ok(test38,2,&Control,&State,1,t381,FALSE,0); + test_items_ok(test39,10,&Control,&State,1,t391,FALSE,0); + test_items_ok(test40,6,&Control,&State,1,t401,FALSE,0); + test_items_ok(test41,6,&Control,&State,1,t411,FALSE,0); + test_items_ok(test42,6,&Control,&State,1,t421,FALSE,0); + test_items_ok(test43,7,&Control,&State,1,t431,FALSE,0); + test_items_ok(test44,4,&Control,&State,2,t441,FALSE,0); + test_items_ok(test45,24,&Control,&State,1,t451,FALSE,0); + test_items_ok(test46,16,&Control,&State,1,t461,FALSE,0); + test_items_ok(test47,26,&Control,&State,1,t471,FALSE,0); + test_items_ok(test48,6,&Control,&State,3,t482,FALSE,0); + test_items_ok(test49,7,&Control,&State,2,t492,FALSE,0); + test_items_ok(test50,6,&Control,&State,3,t502,FALSE,0); + test_items_ok(test51,7,&Control,&State,4,t512,FALSE,0); + test_items_ok(test52,7,&Control,&State,4,t522,FALSE,0); + test_items_ok(test53,8,&Control,&State,4,t532,FALSE,0); + test_items_ok(test54,7,&Control,&State,2,t542,FALSE,0); + test_items_ok(test55,8,&Control,&State,2,t552,FALSE,0); } static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string, @@ -1556,6 +1735,19 @@ hr = ScriptPlace(hdc, &sc, glyphs, 4, attrs, &items[0].a, widths, offset, NULL); ok(hr == S_OK, "ScriptPlace should return S_OK not %08x\n", hr); ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n"); + + if (widths[0] != 0) + { + int old_width = widths[0]; + attrs[0].fZeroWidth = 1; + + hr = ScriptPlace(hdc, &sc, glyphs, 4, attrs, &items[0].a, widths, offset, NULL); + ok(hr == S_OK, "ScriptPlace should return S_OK not %08x\n", hr); + ok(widths[0] == 0, "got width %d\n", widths[0]); + widths[0] = old_width; + } + else + skip("Glyph already has zero-width - skipping fZeroWidth test\n"); ret = ExtTextOutW(hdc, 1, 1, 0, NULL, glyphs, 4, widths); ok(ret, "ExtTextOutW should return TRUE\n"); @@ -2441,6 +2633,70 @@ } } +#define test_caret_item_ScriptXtoCP(a,b,c,d,e,f) _test_caret_item_ScriptXtoCP(__LINE__,a,b,c,d,e,f) + +static void _test_caret_item_ScriptXtoCP(int line, SCRIPT_ANALYSIS *psa, int cChars, int cGlyphs, const int* offsets, const WORD *pwLogClust, const int* piAdvance ) +{ + int iX, iCP, i; + int icChars, icGlyphs; + int piCP; + int clusterSize; + HRESULT hr; + SCRIPT_VISATTR psva[10]; + int piTrailing; + int direction; + + memset(psva,0,sizeof(psva)); + direction = (psa->fRTL)?-1:+1; + + for(iX = -1, i = iCP = 0; i < cChars; i++) + { + if (offsets[i] != iX) + { + iX = offsets[i]; + iCP = i; + } + icChars = cChars; + icGlyphs = cGlyphs; + hr = ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing); + ok_(__FILE__,line)(hr == S_OK, "ScriptXtoCP: should return S_OK not %08x\n", hr); + ok_(__FILE__,line)(piCP == iCP, "ScriptXtoCP: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP); + ok_(__FILE__,line)(piTrailing == 0, "ScriptXtoCP: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing); + } + + for(iX = -2, i = 0; i < cChars; i++) + { + if (offsets[i]+direction != iX) + { + iX = offsets[i] + direction; + iCP = i; + } + icChars = cChars; + icGlyphs = cGlyphs; + hr = ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing); + ok_(__FILE__,line)(hr == S_OK, "ScriptXtoCP leading: should return S_OK not %08x\n", hr); + ok_(__FILE__,line)(piCP == iCP, "ScriptXtoCP leading: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP); + ok_(__FILE__,line)(piTrailing == 0, "ScriptXtoCP leading: iX=%d should return piTrailing=0 not %d\n", iX, piTrailing); + } + + for(clusterSize = 0, iCP = 0, iX = -2, i = 0; i < cChars; i++) + { + clusterSize++; + if (offsets[i] != offsets[i+1]) + { + iX = offsets[i+1]-direction; + icChars = cChars; + icGlyphs = cGlyphs; + hr = ScriptXtoCP(iX, icChars, icGlyphs, pwLogClust, psva, piAdvance, psa, &piCP, &piTrailing); + ok_(__FILE__,line)(hr == S_OK, "ScriptXtoCP trailing: should return S_OK not %08x\n", hr); + ok_(__FILE__,line)(piCP == iCP, "ScriptXtoCP trailing: iX=%d should return piCP=%d not %d\n", iX, iCP, piCP); + ok_(__FILE__,line)(piTrailing == clusterSize, "ScriptXtoCP trailing: iX=%d should return piTrailing=%d not %d\n", iX, clusterSize, piTrailing); + iCP = i+1; + clusterSize = 0; + } + } +} + static void test_ScriptXtoX(void) /**************************************************************************************** * This routine tests the ScriptXtoCP and ScriptCPtoX functions using static variables * @@ -2449,17 +2705,28 @@ WORD pwLogClust[10] = {0, 0, 0, 1, 1, 2, 2, 3, 3, 3}; WORD pwLogClust_RTL[10] = {3, 3, 3, 2, 2, 1, 1, 0, 0, 0}; WORD pwLogClust_2[7] = {4, 3, 3, 2, 1, 0 ,0}; + WORD pwLogClust_3[17] = {0, 1, 1, 1, 1, 4, 5, 6, 6, 8, 8, 8, 8, 11, 11, 13, 13}; + WORD pwLogClust_3_RTL[17] = {13, 13, 11, 11, 8, 8, 8, 8, 6, 6, 5, 4, 1, 1, 1, 1, 0}; int piAdvance[10] = {201, 190, 210, 180, 170, 204, 189, 195, 212, 203}; int piAdvance_2[5] = {39, 26, 19, 17, 11}; + int piAdvance_3[15] = {6, 6, 0, 0, 10, 5, 10, 0, 12, 0, 0, 9, 0, 10, 0}; static const int offsets[13] = {0, 67, 134, 201, 296, 391, 496, 601, 1052, 1503, 1954, 1954, 1954}; static const int offsets_RTL[13] = {781, 721, 661, 601, 496, 391, 296, 201, 134, 67, 0, 0, 0}; static const int offsets_2[10] = {112, 101, 92, 84, 65, 39, 19, 0, 0, 0}; - SCRIPT_VISATTR psva[10]; + + static const int offsets_3[19] = {0, 6, 6, 6, 6, 12, 22, 27, 27, 37, 37, 37, 37, 49, 49, 58, 58, 68, 68}; + static const int offsets_3_RTL[19] = {68, 68, 58, 58, 49, 49, 49, 49, 37, 37, 27, 22, 12, 12, 12, 12, 6, 6}; + + SCRIPT_VISATTR psva[15]; SCRIPT_ANALYSIS sa; - int iX; + SCRIPT_ITEM items[2]; + int iX, i; int piCP; int piTrailing; HRESULT hr; + static const WCHAR hebrW[] = { 0x5be, 0}; + static const WCHAR thaiW[] = { 0xe2a, 0}; + const SCRIPT_PROPERTIES **ppScriptProperties; memset(&sa, 0 , sizeof(SCRIPT_ANALYSIS)); memset(psva, 0, sizeof(psva)); @@ -2521,6 +2788,34 @@ sa.fRTL = TRUE; test_item_ScriptXtoX(&sa, 10, 10, offsets_RTL, pwLogClust_RTL, piAdvance); test_item_ScriptXtoX(&sa, 7, 5, offsets_2, pwLogClust_2, piAdvance_2); + + /* Get thai eScript, This will do LTR and fNeedsCaretInfo */ + hr = ScriptItemize(thaiW, 1, 2, NULL, NULL, items, &i); + ok(hr == S_OK, "got %08x\n", hr); + ok(i == 1, "got %d\n", i); + sa = items[0].a; + + test_caret_item_ScriptXtoCP(&sa, 17, 15, offsets_3, pwLogClust_3, piAdvance_3); + + /* Get hebrew eScript, This will do RTL and fNeedsCaretInfo */ + hr = ScriptItemize(hebrW, 1, 2, NULL, NULL, items, &i); + ok(hr == S_OK, "got %08x\n", hr); + ok(i == 1, "got %d\n", i); + sa = items[0].a; + + /* Note: This behavior CHANGED in uniscribe versions... + * so we only want to test if fNeedsCaretInfo is set */ + hr = ScriptGetProperties(&ppScriptProperties, &i); + if (ppScriptProperties[sa.eScript]->fNeedsCaretInfo) + { + test_caret_item_ScriptXtoCP(&sa, 17, 15, offsets_3_RTL, pwLogClust_3_RTL, piAdvance_3); + hr = ScriptXtoCP(0, 17, 15, pwLogClust_3_RTL, psva, piAdvance_3, &sa, &piCP, &piTrailing); + ok(hr == S_OK, "ScriptXtoCP: should return S_OK not %08x\n", hr); + ok(piCP == 16, "ScriptXtoCP: iX=0 should return piCP=16 not %d\n", piCP); + ok(piTrailing == 1, "ScriptXtoCP: iX=0 should return piTrailing=1 not %d\n", piTrailing); + } + else + win_skip("Uniscribe version too old to test Hebrew clusters\n"); } static void test_ScriptString(HDC hdc)
8 years, 9 months
1
0
0
0
[akhaldi] 70939: [USP10] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:30:03 2016 New Revision: 70939 URL:
http://svn.reactos.org/svn/reactos?rev=70939&view=rev
Log: [USP10] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/usp10/bidi.c trunk/reactos/dll/win32/usp10/indicsyllable.c trunk/reactos/dll/win32/usp10/opentype.c trunk/reactos/dll/win32/usp10/usp10.c trunk/reactos/dll/win32/usp10/usp10_internal.h trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/usp10/bidi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/bidi.c?rev…
============================================================================== --- trunk/reactos/dll/win32/usp10/bidi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/usp10/bidi.c [iso-8859-1] Sat Mar 5 10:30:03 2016 @@ -258,7 +258,7 @@ #define valid_level(x) (x <= MAX_DEPTH && overflow_isolate_count == 0 && overflow_embedding_count == 0) -static void resolveExplicit(int level, WORD *pclass, WORD *poutLevel, int count) +static void resolveExplicit(int level, WORD *pclass, WORD *poutLevel, WORD *poutOverrides, int count, BOOL initialOverride) { /* X1 */ int overflow_isolate_count = 0; @@ -273,8 +273,18 @@ stack[stack_top].override = NI; stack[stack_top].isolate = FALSE; + if (initialOverride) + { + if (odd(level)) + push_stack(level, R, FALSE); + else + push_stack(level, L, FALSE); + } + for (i = 0; i < count; i++) { + poutOverrides[i] = stack[stack_top].override; + /* X2 */ if (pclass[i] == RLE) { @@ -1106,7 +1116,8 @@ INT uCount, /* [in] Number of WCHARs in string. */ const SCRIPT_STATE *s, const SCRIPT_CONTROL *c, - WORD *lpOutLevels /* [out] final string levels */ + WORD *lpOutLevels, /* [out] final string levels */ + WORD *lpOutOverrides /* [out] final string overrides */ ) { WORD *chartype; @@ -1128,8 +1139,10 @@ classify(lpString, chartype, uCount, c); if (TRACE_ON(bidi)) dump_types("Start ", chartype, 0, uCount); + memset(lpOutOverrides, 0, sizeof(WORD) * uCount); + /* resolve explicit */ - resolveExplicit(baselevel, chartype, lpOutLevels, uCount); + resolveExplicit(baselevel, chartype, lpOutLevels, lpOutOverrides, uCount, s->fOverrideDirection); if (TRACE_ON(bidi)) dump_types("After Explicit", chartype, 0, uCount); /* X10/BD13: Computer Isolating runs */ Modified: trunk/reactos/dll/win32/usp10/indicsyllable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/indicsylla…
============================================================================== --- trunk/reactos/dll/win32/usp10/indicsyllable.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/usp10/indicsyllable.c [iso-8859-1] Sat Mar 5 10:30:03 2016 @@ -3,7 +3,7 @@ /* and from
http://www.unicode.org/Public/8.0.0/ucd/IndicPositionalCategory.txt
*/ /* DO NOT EDIT!! */ -const unsigned short indic_syllabic_table[3088] = +const unsigned short indic_syllabic_table[3264] = { /* level 1 offsets */ 0x0100, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, @@ -62,25 +62,25 @@ 0x0810, 0x0820, 0x0830, 0x0820, 0x0830, 0x0840, 0x0810, 0x0850, 0x02e0, 0x02e0, 0x0860, 0x0870, 0x0880, 0x0890, 0x0280, 0x0260, 0x08a0, 0x0650, 0x08b0, 0x08c0, 0x03f0, 0x02e0, 0x08d0, 0x08e0, - 0x0260, 0x0260, 0x0260, 0x08f0, 0x0900, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0910, 0x0260, 0x0260, 0x0260, 0x0920, 0x0930, 0x0940, + 0x02e0, 0x02e0, 0x08f0, 0x0900, 0x0910, 0x0280, 0x0260, 0x0260, + 0x02e0, 0x0920, 0x02e0, 0x02e0, 0x0930, 0x0940, 0x0950, 0x0960, + 0x0280, 0x0280, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, + 0x0970, 0x0830, 0x02e0, 0x0980, 0x0990, 0x0280, 0x09a0, 0x09b0, + 0x09c0, 0x02e0, 0x09d0, 0x09e0, 0x02e0, 0x02e0, 0x09f0, 0x0a00, + 0x02e0, 0x02e0, 0x0a10, 0x0a20, 0x0a30, 0x0260, 0x0260, 0x0260, + 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0a40, 0x0a50, 0x0a60, + 0x0a70, 0x0a80, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0a90, + 0x0aa0, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0950, 0x0260, 0x0260, 0x0960, 0x0970, 0x0260, 0x0980, 0x0990, - 0x09a0, 0x0260, 0x09b0, 0x09c0, 0x0260, 0x0260, 0x09d0, 0x09e0, - 0x0260, 0x0260, 0x09f0, 0x0a00, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0a10, 0x0a20, 0x0a30, - 0x0a40, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0a50, + 0x0260, 0x0260, 0x0260, 0x0260, 0x0ab0, 0x0260, 0x0260, 0x0260, + 0x0ac0, 0x02e0, 0x0ad0, 0x0260, 0x02e0, 0x0ae0, 0x0af0, 0x0b00, + 0x0b10, 0x0b20, 0x02e0, 0x0b30, 0x0b40, 0x0280, 0x0b50, 0x0b60, + 0x0b70, 0x02e0, 0x0b80, 0x02e0, 0x0b90, 0x0ba0, 0x0260, 0x0260, + 0x0bb0, 0x02e0, 0x02e0, 0x0bc0, 0x0bd0, 0x0280, 0x0be0, 0x0bf0, + 0x0c00, 0x02e0, 0x0c10, 0x0c20, 0x0c30, 0x0280, 0x02e0, 0x0c40, + 0x02e0, 0x02e0, 0x02e0, 0x0c50, 0x0c60, 0x0260, 0x0c70, 0x0c80, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0a60, 0x0260, 0x0260, 0x0260, - 0x0a70, 0x0260, 0x0a80, 0x0260, 0x0260, 0x0260, 0x0a90, 0x0aa0, - 0x0ab0, 0x0260, 0x0260, 0x0ac0, 0x0ad0, 0x0260, 0x0ae0, 0x0af0, - 0x0260, 0x0260, 0x0b00, 0x0260, 0x0b10, 0x0b20, 0x0260, 0x0260, - 0x0b30, 0x0260, 0x0260, 0x0b40, 0x0b50, 0x0260, 0x0b60, 0x0260, - 0x0260, 0x0260, 0x0b70, 0x0b80, 0x0b90, 0x0260, 0x0260, 0x0ba0, - 0x0260, 0x0260, 0x0260, 0x0bb0, 0x0bc0, 0x0260, 0x0bd0, 0x0be0, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0bf0, 0x0c00, 0x0260, + 0x0260, 0x0260, 0x0260, 0x0260, 0x0c90, 0x0ca0, 0x0cb0, 0x0280, /* values */ 0x5f00, 0x9c00, 0x9500, 0x9500, 0x8600, 0x8600, 0x8600, 0x8600, 0x7e00, 0x6e00, 0x5d00, 0x5100, 0x4200, 0x2d00, 0x1700, 0x0a00, @@ -294,104 +294,126 @@ 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0000, 0x0000, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0300, 0x0300, 0x0300, - 0x0100, 0x0100, 0x0000, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0500, - 0x0600, 0x0200, 0x0100, 0x0507, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x020e, 0x060e, 0x010f, - 0x0500, 0x0500, 0x0500, 0x0600, 0x0600, 0x0600, 0x0600, 0x0000, - 0x0017, 0x0107, 0x0507, 0x0100, 0x0100, 0x0500, 0x0500, 0x0500, - 0x0500, 0x0600, 0x0600, 0x0500, 0x0600, 0x0100, 0x0200, 0x0200, - 0x0200, 0x0200, 0x0200, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, - 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0000, 0x0000, 0x0621, - 0x0500, 0x0500, 0x0500, 0x050c, 0x0102, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0504, 0x0107, 0x0500, 0x0500, - 0x0600, 0x0600, 0x0600, 0x0007, 0x0007, 0x0000, 0x0200, 0x0200, - 0x0400, 0x0400, 0x0507, 0x0007, 0x0105, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0307, 0x0307, 0x0307, + 0x0107, 0x0107, 0x0007, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, + 0x0107, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, + 0x0113, 0x0113, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0507, + 0x0607, 0x0207, 0x0107, 0x0507, 0x0000, 0x0000, 0x0000, 0x0000, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0006, 0x0006, 0x0006, + 0x0006, 0x0006, 0x0006, 0x000a, 0x000a, 0x020e, 0x060e, 0x010f, + 0x050f, 0x050f, 0x050f, 0x060f, 0x060f, 0x060f, 0x060f, 0x0000, + 0x0017, 0x0107, 0x0507, 0x0107, 0x0107, 0x0507, 0x0507, 0x0507, + 0x0507, 0x0607, 0x0607, 0x0507, 0x0607, 0x0107, 0x0207, 0x0207, + 0x0207, 0x0207, 0x0207, 0x0507, 0x0507, 0x0513, 0x0513, 0x0513, + 0x0513, 0x0513, 0x0521, 0x0521, 0x0521, 0x0000, 0x0000, 0x0621, + 0x0501, 0x0501, 0x0501, 0x050c, 0x0102, 0x0006, 0x0006, 0x0006, + 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, + 0x000a, 0x000a, 0x000a, 0x000a, 0x0504, 0x0107, 0x0507, 0x0507, + 0x0607, 0x0607, 0x0607, 0x0007, 0x0007, 0x0007, 0x0207, 0x0207, + 0x0407, 0x0407, 0x0507, 0x0007, 0x0105, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0500, 0x0600, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0501, 0x050c, 0x0102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x010d, 0x0600, 0x0600, 0x0500, 0x0600, 0x0200, 0x0100, - 0x0500, 0x0500, 0x0116, 0x0017, 0x0600, 0x0600, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0504, 0x0107, - 0x0500, 0x0500, 0x0100, 0x0100, 0x0100, 0x0507, 0x0107, 0x0507, - 0x0500, 0x0500, 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x0100, 0x0100, 0x0200, - 0x0200, 0x0000, 0x0100, 0x0100, 0x0607, 0x0500, 0x0500, 0x0500, - 0x0500, 0x0500, 0x0500, 0x0500, 0x0200, 0x0200, 0x0521, 0x0604, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0500, 0x0500, 0x0500, 0x0000, 0x0d00, 0x0600, 0x0600, 0x0600, - 0x0600, 0x0600, 0x0500, 0x0500, 0x0600, 0x0600, 0x0600, 0x0600, - 0x0500, 0x0119, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, + 0x0501, 0x050c, 0x0102, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, + 0x0006, 0x0006, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x010d, 0x060d, 0x060d, 0x0507, 0x0607, 0x0207, 0x0107, + 0x0507, 0x0507, 0x0116, 0x0017, 0x060d, 0x060d, 0x000a, 0x000a, + 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, + 0x001d, 0x001d, 0x0003, 0x000a, 0x000a, 0x000a, 0x000f, 0x000f, + 0x000a, 0x000a, 0x000a, 0x000a, 0x0006, 0x0006, 0x0504, 0x0107, + 0x0507, 0x0507, 0x0107, 0x0107, 0x0107, 0x0507, 0x0107, 0x0507, + 0x050f, 0x050f, 0x0116, 0x0116, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x000a, 0x000a, 0x000a, 0x000a, 0x010d, 0x010d, 0x0107, 0x0207, + 0x0207, 0x0007, 0x0107, 0x0107, 0x0607, 0x050f, 0x050f, 0x050f, + 0x050f, 0x050f, 0x050f, 0x050f, 0x0201, 0x0201, 0x0521, 0x0604, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, + 0x001d, 0x001d, 0x0000, 0x0000, 0x0000, 0x000a, 0x000a, 0x000a, + 0x0519, 0x0519, 0x0519, 0x0000, 0x0d19, 0x0619, 0x0619, 0x0619, + 0x0619, 0x0619, 0x0519, 0x0519, 0x0619, 0x0619, 0x0619, 0x0619, + 0x0519, 0x0119, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0600, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0519, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0002, 0x0002, 0x0519, 0x0000, 0x0000, 0x0000, + 0x0019, 0x0019, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x001a, 0x001b, 0x0000, 0x0000, + 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0021, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0021, 0x0021, 0x0021, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0009, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0516, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0501, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0100, 0x0100, 0x0600, 0x0500, 0x0107, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0008, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x000d, 0x000a, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0101, 0x0102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x010f, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0605, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, - 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, - 0x0500, 0x0500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0600, 0x0600, 0x0600, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0600, - 0x0600, 0x0600, 0x0500, 0x0600, 0x0600, 0x0600, 0x0600, 0x0500, - 0x0500, 0x0500, 0x010f, 0x0116, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0500, 0x0500, 0x050c, 0x0102, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0504, 0x0100, 0x0100, 0x0500, 0x0500, - 0x0600, 0x0600, 0x0200, 0x0200, 0x0507, 0x010d, 0x0100, 0x0100, + 0x0006, 0x0006, 0x0000, 0x0006, 0x0006, 0x0006, 0x0516, 0x000a, + 0x000a, 0x000a, 0x000a, 0x0501, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x0107, 0x0107, 0x0607, 0x0507, 0x0107, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0008, 0x0008, + 0x0008, 0x0008, 0x000a, 0x000a, 0x000a, 0x000a, 0x0008, 0x000d, + 0x000d, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000d, 0x000a, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0101, 0x0102, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, + 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, + 0x0006, 0x0006, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x010f, 0x0107, 0x0107, 0x0107, + 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, + 0x0107, 0x0107, 0x0107, 0x0107, 0x0605, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0519, 0x0519, 0x0519, 0x0519, 0x0519, 0x0519, 0x0519, 0x0519, + 0x0519, 0x0519, 0x0519, 0x0519, 0x0519, 0x0519, 0x0519, 0x0519, + 0x0519, 0x0519, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, + 0x001d, 0x001d, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, + 0x0008, 0x0008, 0x0008, 0x0613, 0x0613, 0x0613, 0x0000, 0x0000, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0607, + 0x0607, 0x0607, 0x0507, 0x0607, 0x0607, 0x0607, 0x0607, 0x050f, + 0x050f, 0x050f, 0x010f, 0x0116, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0501, 0x0501, 0x050c, 0x0102, 0x0006, 0x0006, 0x0006, 0x0006, + 0x0006, 0x000a, 0x000a, 0x000a, 0x0006, 0x0006, 0x0006, 0x000a, + 0x000a, 0x000a, 0x000a, 0x0504, 0x0107, 0x0107, 0x0507, 0x0507, + 0x0607, 0x0607, 0x0207, 0x0207, 0x0507, 0x010d, 0x010e, 0x010e, 0x0005, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0507, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0500, 0x0500, 0x0500, 0x0500, 0x0600, 0x0500, 0x0200, - 0x0200, 0x0500, 0x0600, 0x0100, 0x0200, 0x0600, 0x0600, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x050f, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x050f, 0x010f, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x000a, 0x0113, 0x0513, 0x0113, 0x0000, 0x0000, - 0x0507, 0x0107, 0x0500, 0x0500, 0x0600, 0x0300, 0x0300, 0x0500, - 0x0500, 0x0000, 0x0100, 0x0300, 0x0300, 0x0100, 0x0507, 0x0513, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0507, 0x0000, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, + 0x001d, 0x001d, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0000, + 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x0507, 0x0507, 0x0507, 0x0507, 0x0607, 0x0507, 0x0207, + 0x0207, 0x0507, 0x0607, 0x010e, 0x020e, 0x060e, 0x060e, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x000f, 0x000f, 0x000f, 0x050f, 0x000f, 0x000f, 0x000f, 0x000f, + 0x000f, 0x000f, 0x000f, 0x000f, 0x050f, 0x010f, 0x0000, 0x0000, + 0x0000, 0x000a, 0x000a, 0x000a, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000a, 0x0113, 0x0513, 0x0113, 0x000a, 0x000a, + 0x0507, 0x0107, 0x0507, 0x0507, 0x0607, 0x0307, 0x0307, 0x0507, + 0x0507, 0x0007, 0x0107, 0x0307, 0x0307, 0x0107, 0x0507, 0x0513, 0x0012, 0x0513, 0x0012, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0207, 0x0600, 0x0500, 0x0200, 0x0100, + 0x0006, 0x0006, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x0207, 0x0607, 0x0507, 0x0207, 0x0107, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0102, 0x0017, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x000a, 0x0006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0100, 0x0100, 0x0507, 0x0100, 0x0100, - 0x0607, 0x0100, 0x0100, 0x0000, 0x0113, 0x0616, 0x0000, 0x0000 + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0006, 0x0006, + 0x000a, 0x0006, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x000a, 0x000a, 0x000a, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, + 0x000f, 0x000f, 0x000f, 0x0107, 0x0107, 0x0507, 0x0107, 0x0107, + 0x0607, 0x0107, 0x0107, 0x0000, 0x0113, 0x0616, 0x0000, 0x0000 }; Modified: trunk/reactos/dll/win32/usp10/opentype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/opentype.c…
============================================================================== --- trunk/reactos/dll/win32/usp10/opentype.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/usp10/opentype.c [iso-8859-1] Sat Mar 5 10:30:03 2016 @@ -266,6 +266,12 @@ WORD GlyphCount; WORD Alternate[1]; } GSUB_AlternateSet; + +typedef struct { + WORD SubstFormat; + WORD ExtensionLookupType; + DWORD ExtensionOffset; +} GSUB_ExtensionPosFormat1; /* These are all structures needed for the GPOS table */ @@ -715,6 +721,25 @@ return -1; } +static const BYTE *GSUB_get_subtable(const OT_LookupTable *look, int index) +{ + int offset = GET_BE_WORD(look->SubTable[index]); + + if (GET_BE_WORD(look->LookupType) == 7) + { + const GSUB_ExtensionPosFormat1 *ext = (const GSUB_ExtensionPosFormat1 *)((const BYTE *)look + offset); + if (GET_BE_WORD(ext->SubstFormat) == 1) + { + offset += GET_BE_DWORD(ext->ExtensionOffset); + } + else + { + FIXME("Unhandled Extension Substitution Format %i\n",GET_BE_WORD(ext->SubstFormat)); + } + } + return (const BYTE *)look + offset; +} + static INT GSUB_apply_SingleSubst(const OT_LookupTable *look, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) { int j; @@ -722,10 +747,7 @@ for (j = 0; j < GET_BE_WORD(look->SubTableCount); j++) { - int offset; - const GSUB_SingleSubstFormat1 *ssf1; - offset = GET_BE_WORD(look->SubTable[j]); - ssf1 = (const GSUB_SingleSubstFormat1*)((const BYTE*)look+offset); + const GSUB_SingleSubstFormat1 *ssf1 = (const GSUB_SingleSubstFormat1*)GSUB_get_subtable(look, j); if (GET_BE_WORD(ssf1->SubstFormat) == 1) { int offset = GET_BE_WORD(ssf1->Coverage); @@ -773,8 +795,7 @@ { int offset, index; const GSUB_MultipleSubstFormat1 *msf1; - offset = GET_BE_WORD(look->SubTable[j]); - msf1 = (const GSUB_MultipleSubstFormat1*)((const BYTE*)look+offset); + msf1 = (const GSUB_MultipleSubstFormat1*)GSUB_get_subtable(look, j); offset = GET_BE_WORD(msf1->Coverage); index = GSUB_is_glyph_covered((const BYTE*)msf1+offset, glyphs[glyph_index]); @@ -823,8 +844,7 @@ const GSUB_AlternateSubstFormat1 *asf1; INT index; - offset = GET_BE_WORD(look->SubTable[j]); - asf1 = (const GSUB_AlternateSubstFormat1*)((const BYTE*)look+offset); + asf1 = (const GSUB_AlternateSubstFormat1*)GSUB_get_subtable(look, j); offset = GET_BE_WORD(asf1->Coverage); index = GSUB_is_glyph_covered((const BYTE*)asf1+offset, glyphs[glyph_index]); @@ -856,8 +876,7 @@ const GSUB_LigatureSubstFormat1 *lsf1; int offset,index; - offset = GET_BE_WORD(look->SubTable[j]); - lsf1 = (const GSUB_LigatureSubstFormat1*)((const BYTE*)look+offset); + lsf1 = (const GSUB_LigatureSubstFormat1*)GSUB_get_subtable(look, j); offset = GET_BE_WORD(lsf1->Coverage); index = GSUB_is_glyph_covered((const BYTE*)lsf1+offset, glyphs[glyph_index]); TRACE(" Coverage index %i\n",index); @@ -923,8 +942,7 @@ int dirLookahead = write_dir; int dirBacktrack = -1 * write_dir; - offset = GET_BE_WORD(look->SubTable[j]); - ccsf1 = (const GSUB_ChainContextSubstFormat1*)((const BYTE*)look+offset); + ccsf1 = (const GSUB_ChainContextSubstFormat1*)GSUB_get_subtable(look, j); if (GET_BE_WORD(ccsf1->SubstFormat) == 1) { static int once; @@ -1019,12 +1037,34 @@ static INT GSUB_apply_lookup(const OT_LookupList* lookup, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) { int offset; + int type; const OT_LookupTable *look; offset = GET_BE_WORD(lookup->Lookup[lookup_index]); look = (const OT_LookupTable*)((const BYTE*)lookup + offset); - TRACE("type %i, flag %x, subtables %i\n",GET_BE_WORD(look->LookupType),GET_BE_WORD(look->LookupFlag),GET_BE_WORD(look->SubTableCount)); - switch(GET_BE_WORD(look->LookupType)) + type = GET_BE_WORD(look->LookupType); + TRACE("type %i, flag %x, subtables %i\n",type,GET_BE_WORD(look->LookupFlag),GET_BE_WORD(look->SubTableCount)); + if (type == 7) + { + if (GET_BE_WORD(look->SubTableCount)) + { + const GSUB_ExtensionPosFormat1 *ext = (const GSUB_ExtensionPosFormat1 *)((const BYTE *)look + GET_BE_WORD(look->SubTable[0])); + if (GET_BE_WORD(ext->SubstFormat) == 1) + { + type = GET_BE_WORD(ext->ExtensionLookupType); + TRACE("extension type %i\n",type); + } + else + { + FIXME("Unhandled Extension Substitution Format %i\n",GET_BE_WORD(ext->SubstFormat)); + } + } + else + { + WARN("lookup type is Extension Substitution but no extension subtable exists\n"); + } + } + switch(type) { case 1: return GSUB_apply_SingleSubst(look, glyphs, glyph_index, write_dir, glyph_count); @@ -1036,8 +1076,11 @@ return GSUB_apply_LigatureSubst(look, glyphs, glyph_index, write_dir, glyph_count); case 6: return GSUB_apply_ChainContextSubst(lookup, look, glyphs, glyph_index, write_dir, glyph_count); + case 7: + FIXME("Extension Substitution types not valid here\n"); + break; default: - FIXME("We do not handle SubType %i\n",GET_BE_WORD(look->LookupType)); + FIXME("We do not handle SubType %i\n",type); } return GSUB_E_NOGLYPH; } Modified: trunk/reactos/dll/win32/usp10/usp10.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10.c?re…
============================================================================== --- trunk/reactos/dll/win32/usp10/usp10.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/usp10/usp10.c [iso-8859-1] Sat Mar 5 10:30:03 2016 @@ -26,6 +26,7 @@ #include "usp10_internal.h" +#include <math.h> #include <winuser.h> #include <winreg.h> @@ -708,11 +709,6 @@ return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); } -static inline void *heap_realloc_zero(LPVOID mem, SIZE_T size) -{ - return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, size); -} - static inline BOOL heap_free(LPVOID mem) { return HeapFree(GetProcessHeap(), 0, mem); @@ -1261,9 +1257,12 @@ int New_Script = -1; int i; WORD *levels = NULL; + WORD *layout_levels = NULL; + WORD *overrides = NULL; WORD *strength = NULL; WORD *scripts = NULL; WORD baselevel = 0; + WORD baselayout = 0; BOOL new_run; WORD last_indic = -1; WORD layoutRTL = 0; @@ -1300,9 +1299,15 @@ else if (is_indic(scripts[i])) last_indic = base_indic(scripts[i]); - /* Some unicode points (Zero Width Space U+200B - - Right-to-Left Mark U+200F) will force us into bidi mode */ - if (!forceLevels && pwcInChars[i] >= 0x200B && pwcInChars[i] <= 0x200F) + /* Some unicode points : + (Zero Width Space U+200B - Right-to-Left Mark U+200F) + (Left Right Embed U+202A - Left Right Override U+202D) + (Left Right Isolate U+2066 - Pop Directional Isolate U+2069) + will force us into bidi mode */ + if (!forceLevels && ((pwcInChars[i] >= 0x200B && pwcInChars[i] <= 0x200F) || + (pwcInChars[i] >= 0x202A && pwcInChars[i] <= 0x202E) || + (pwcInChars[i] >= 0x2066 && pwcInChars[i] <= 0x2069))) + forceLevels = TRUE; /* Diacritical marks merge with other scripts */ @@ -1366,20 +1371,56 @@ if (!levels) goto nomemory; - BIDI_DetermineLevels(pwcInChars, cInChars, psState, psControl, levels); + overrides = heap_alloc_zero(cInChars * sizeof(WORD)); + if (!overrides) + goto nomemory; + + layout_levels = heap_alloc_zero(cInChars * sizeof(WORD)); + if (!layout_levels) + goto nomemory; + + if (psState->fOverrideDirection) + { + if (!forceLevels) + { + SCRIPT_STATE s = *psState; + s.fOverrideDirection = FALSE; + BIDI_DetermineLevels(pwcInChars, cInChars, &s, psControl, layout_levels, overrides); + if (odd(layout_levels[0])) + forceLevels = TRUE; + else for (i = 0; i < cInChars; i++) + if (layout_levels[i]!=layout_levels[0]) + { + forceLevels = TRUE; + break; + } + } + + BIDI_DetermineLevels(pwcInChars, cInChars, psState, psControl, levels, overrides); + } + else + { + BIDI_DetermineLevels(pwcInChars, cInChars, psState, psControl, levels, overrides); + memcpy(layout_levels, levels, cInChars * sizeof(WORD)); + } baselevel = levels[0]; + baselayout = layout_levels[0]; for (i = 0; i < cInChars; i++) if (levels[i]!=levels[0]) break; if (i >= cInChars && !odd(baselevel) && !odd(psState->uBidiLevel) && !forceLevels) { heap_free(levels); + heap_free(overrides); + heap_free(layout_levels); + overrides = NULL; levels = NULL; + layout_levels = NULL; } else { - BOOL inNumber = FALSE; static const WCHAR math_punc[] = {'#','$','%','+',',','-','.','/',':',0x2212, 0x2044, 0x00a0,0}; + static const WCHAR repeatable_math_punc[] = {'#','$','%','+','-','/',0x2212, 0x2044,0}; strength = heap_alloc_zero(cInChars * sizeof(WORD)); if (!strength) @@ -1394,21 +1435,48 @@ strength[i] = BIDI_STRONG; } + /* Math punctuation bordered on both sides by numbers can be + merged into the number */ for (i = 0; i < cInChars; i++) { - /* Script_Numeric and select puncuation at level 0 get bumped to level 2 */ - if ((levels[i] == 0 || (odd(psState->uBidiLevel) && levels[i] == psState->uBidiLevel+1)) && inNumber && strchrW(math_punc,pwcInChars[i])) + if (i > 0 && i < cInChars-1 && + scripts[i-1] == Script_Numeric && + strchrW(math_punc, pwcInChars[i])) { - scripts[i] = Script_Numeric; + if (scripts[i+1] == Script_Numeric) + { + scripts[i] = Script_Numeric; + levels[i] = levels[i-1]; + strength[i] = strength[i-1]; + i++; + } + else if (strchrW(repeatable_math_punc, pwcInChars[i])) + { + int j; + for (j = i+1; j < cInChars; j++) + { + if (scripts[j] == Script_Numeric) + { + for(;i<j; i++) + { + scripts[i] = Script_Numeric; + levels[i] = levels[i-1]; + strength[i] = strength[i-1]; + } + } + else if (pwcInChars[i] != pwcInChars[j]) break; + } + } + } + } + + for (i = 0; i < cInChars; i++) + { + /* Script_Numeric at level 0 get bumped to level 2 */ + if (!overrides[i] && (levels[i] == 0 || (odd(psState->uBidiLevel) && levels[i] == psState->uBidiLevel+1)) && scripts[i] == Script_Numeric) + { levels[i] = 2; } - else if ((levels[i] == 0 || (odd(psState->uBidiLevel) && levels[i] == psState->uBidiLevel+1)) && scripts[i] == Script_Numeric) - { - levels[i] = 2; - inNumber = TRUE; - } - else - inNumber = FALSE; /* Joiners get merged preferencially right */ if (i > 0 && (pwcInChars[i] == ZWJ || pwcInChars[i] == ZWNJ)) @@ -1491,19 +1559,31 @@ if (levels) { if (strength[cnt] == BIDI_STRONG) - layoutRTL = (odd(levels[cnt]))?1:0; + layoutRTL = odd(layout_levels[cnt]); else - layoutRTL = (psState->uBidiLevel || odd(levels[cnt]))?1:0; + layoutRTL = (psState->uBidiLevel || odd(layout_levels[cnt])); + if (overrides) + pItems[index].a.s.fOverrideDirection = (overrides[cnt] != 0); pItems[index].a.fRTL = odd(levels[cnt]); - pItems[index].a.fLayoutRTL = layoutRTL; + if (pItems[index].a.eScript == Script_Numeric || + pItems[index].a.eScript == Script_Numeric2) + pItems[index].a.fLayoutRTL = layoutRTL; + else + pItems[index].a.fLayoutRTL = pItems[index].a.fRTL; pItems[index].a.s.uBidiLevel = levels[cnt]; } - else if (!pItems[index].a.s.uBidiLevel) - { - layoutRTL = (odd(baselevel))?1:0; + else if (!pItems[index].a.s.uBidiLevel || (overrides && overrides[cnt])) + { + if (pItems[index].a.s.uBidiLevel != baselevel) + pItems[index].a.s.fOverrideDirection = TRUE; + layoutRTL = odd(baselayout); pItems[index].a.s.uBidiLevel = baselevel; - pItems[index].a.fLayoutRTL = odd(baselevel); pItems[index].a.fRTL = odd(baselevel); + if (pItems[index].a.eScript == Script_Numeric || + pItems[index].a.eScript == Script_Numeric2) + pItems[index].a.fLayoutRTL = odd(baselayout); + else + pItems[index].a.fLayoutRTL = pItems[index].a.fRTL; } TRACE("New_Level=%i New_Strength=%i New_Script=%d, eScript=%d index=%d cnt=%d iCharPos=%d\n", @@ -1554,8 +1634,10 @@ if (!new_run && strength && str == BIDI_STRONG) { - layoutRTL = odd(levels[cnt])?1:0; - pItems[index].a.fLayoutRTL = layoutRTL; + layoutRTL = odd(layout_levels[cnt]); + if (pItems[index].a.eScript == Script_Numeric || + pItems[index].a.eScript == Script_Numeric2) + pItems[index].a.fLayoutRTL = layoutRTL; } if (new_run) @@ -1577,19 +1659,31 @@ pScriptTags[index] = scriptInformation[New_Script].scriptTag; if (levels) { - if (levels[cnt] == 0) + if (overrides) + pItems[index].a.s.fOverrideDirection = (overrides[cnt] != 0); + if (layout_levels[cnt] == 0) layoutRTL = 0; else - layoutRTL = (layoutRTL || odd(levels[cnt]))?1:0; + layoutRTL = (layoutRTL || odd(layout_levels[cnt])); pItems[index].a.fRTL = odd(levels[cnt]); - pItems[index].a.fLayoutRTL = layoutRTL; + if (pItems[index].a.eScript == Script_Numeric || + pItems[index].a.eScript == Script_Numeric2) + pItems[index].a.fLayoutRTL = layoutRTL; + else + pItems[index].a.fLayoutRTL = pItems[index].a.fRTL; pItems[index].a.s.uBidiLevel = levels[cnt]; } - else if (!pItems[index].a.s.uBidiLevel) + else if (!pItems[index].a.s.uBidiLevel || (overrides && overrides[cnt])) { + if (pItems[index].a.s.uBidiLevel != baselevel) + pItems[index].a.s.fOverrideDirection = TRUE; pItems[index].a.s.uBidiLevel = baselevel; - pItems[index].a.fLayoutRTL = layoutRTL; pItems[index].a.fRTL = odd(baselevel); + if (pItems[index].a.eScript == Script_Numeric|| + pItems[index].a.eScript == Script_Numeric2) + pItems[index].a.fLayoutRTL = layoutRTL; + else + pItems[index].a.fLayoutRTL = pItems[index].a.fRTL; } TRACE("index=%d cnt=%d iCharPos=%d\n", index, cnt, pItems[index].iCharPos); @@ -1613,6 +1707,8 @@ res = S_OK; nomemory: heap_free(levels); + heap_free(overrides); + heap_free(layout_levels); heap_free(strength); heap_free(scripts); return res; @@ -2567,9 +2663,100 @@ return S_OK; } +/* Count the number of characters in a cluster and its starting index*/ +static inline BOOL get_cluster_data(const WORD *pwLogClust, int cChars, int cluster_index, int *cluster_size, int *start_index) +{ + int size = 0; + int i; + + for (i = 0; i < cChars; i++) + { + if (pwLogClust[i] == cluster_index) + { + if (!size && start_index) + { + *start_index = i; + if (!cluster_size) + return TRUE; + } + size++; + } + else if (size) break; + } + if (cluster_size) + *cluster_size = size; + + return (size > 0); +} + +/* + To handle multi-glyph clusters we need to find all the glyphs that are + represented in the cluster. This involves finding the glyph whose + index is the cluster index as well as whose glyph indices are greater than + our cluster index but not part of a new cluster. + + Then we sum all those glyphs' advances. +*/ +static inline int get_cluster_advance(const int* piAdvance, + const SCRIPT_VISATTR *psva, + const WORD *pwLogClust, int cGlyphs, + int cChars, int cluster, int direction) +{ + int glyph_start; + int glyph_end; + int i, advance; + + if (direction > 0) + i = 0; + else + i = (cChars - 1); + + for (glyph_start = -1, glyph_end = -1; i < cChars && i >= 0 && (glyph_start < 0 || glyph_end < 0); i+=direction) + { + if (glyph_start < 0 && pwLogClust[i] != cluster) continue; + if (pwLogClust[i] == cluster && glyph_start < 0) glyph_start = pwLogClust[i]; + if (glyph_start >= 0 && glyph_end < 0 && pwLogClust[i] != cluster) glyph_end = pwLogClust[i]; + } + if (glyph_end < 0) + { + if (direction > 0) + glyph_end = cGlyphs; + else + { + /* Don't fully understand multi-glyph reversed clusters yet, + * do they occur for real or just in our test? */ + FIXME("multi-glyph reversed clusters found\n"); + glyph_end = glyph_start + 1; + } + } + + /* Check for fClusterStart, finding this generally would mean a malformed set of data */ + for (i = glyph_start+1; i< glyph_end; i++) + { + if (psva[i].fClusterStart) + { + glyph_end = i; + break; + } + } + + for (advance = 0, i = glyph_start; i < glyph_end; i++) + advance += piAdvance[i]; + + return advance; +} + + /*********************************************************************** * ScriptXtoCP (USP10.@) * + * Basic algorithm : + * use piAdvance to find the cluster we are looking at + * Find the character that is the first character of the cluster + * That is our base piCP + * If the script snaps to cluster boundries (Hebrew, Indic, Thai) then we + * are good Otherwise if the cluster is larger than 1 glyph we need to + * determine how far through the cluster to advance the cursor. */ HRESULT WINAPI ScriptXtoCP(int iX, int cChars, @@ -2581,16 +2768,11 @@ int *piCP, int *piTrailing) { - int item; - float iPosX; - float iLastPosX; - int iSpecial = -1; - int iCluster = -1; - int clust_size = 1; - int cjump = 0; - int advance; - float special_size = 0.0; int direction = 1; + int iPosX; + int i; + int glyph_index, cluster_index; + int cluster_size; TRACE("(%d,%d,%d,%p,%p,%p,%p,%p,%p)\n", iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, @@ -2599,128 +2781,156 @@ if (psa->fRTL && ! psa->fLogicalOrder) direction = -1; - if (direction<0) - { - int max_clust = pwLogClust[0]; - - if (iX < 0) + /* Handle an iX < 0 */ + if (iX < 0) + { + if (direction < 0) { *piCP = cChars; *piTrailing = 0; - return S_OK; - } - - for (item=0; item < cChars; item++) - if (pwLogClust[item] > max_clust) + } + else + { + *piCP = -1; + *piTrailing = 1; + } + return S_OK; + } + + /* Looking for non-reversed clusters in a reversed string */ + if (direction < 0) + { + int max_clust = pwLogClust[0]; + for (i=0; i< cChars; i++) + if (pwLogClust[i] > max_clust) { - ERR("We do not handle non reversed clusters properly\n"); + FIXME("We do not handle non reversed clusters properly\n"); break; } } - if (iX < 0) - { - *piCP = -1; - *piTrailing = 1; - return S_OK; - } - - iPosX = iLastPosX = 0; + /* find the glyph_index based in iX */ if (direction > 0) - item = 0; + { + for (glyph_index = -1, iPosX = iX; iPosX >=0 && glyph_index < cGlyphs; iPosX -= piAdvance[glyph_index+1], glyph_index++) + ; + } else - item = cChars - 1; - for (; iPosX <= iX && item < cChars && item >= 0; item+=direction) - { - iLastPosX = iPosX; - if (iSpecial == -1 && - (iCluster == -1 || - (iCluster != -1 && - ((direction > 0 && iCluster+clust_size <= item) || - (direction < 0 && iCluster-clust_size >= item)) - ) - ) - ) - { - int check; - int clust = pwLogClust[item]; - - iCluster = -1; - cjump = 0; - clust_size = get_cluster_size(pwLogClust, cChars, item, direction, - &iCluster, &check); - advance = get_glyph_cluster_advance(piAdvance, psva, pwLogClust, cGlyphs, cChars, clust, direction); - - if (check >= cChars && direction > 0) + { + for (glyph_index = -1, iPosX = iX; iPosX > 0 && glyph_index < cGlyphs; iPosX -= piAdvance[glyph_index+1], glyph_index++) + ; + } + + TRACE("iPosX %i -> glyph_index %i (%i)\n", iPosX, glyph_index, cGlyphs); + + *piTrailing = 0; + if (glyph_index >= 0 && glyph_index < cGlyphs) + { + /* find the cluster */ + if (direction > 0 ) + for (i = 0, cluster_index = pwLogClust[0]; i < cChars && pwLogClust[i] <= glyph_index; cluster_index=pwLogClust[i++]) + ; + else + for (i = 0, cluster_index = pwLogClust[0]; i < cChars && pwLogClust[i] >= glyph_index; cluster_index=pwLogClust[i++]) + ; + + TRACE("cluster_index %i\n", cluster_index); + + if (direction < 0 && iPosX >= 0 && glyph_index != cluster_index) + { + /* We are off the end of the string */ + *piCP = -1; + *piTrailing = 1; + return S_OK; + } + + get_cluster_data(pwLogClust, cChars, cluster_index, &cluster_size, &i); + + TRACE("first char index %i\n",i); + if (scriptInformation[psa->eScript].props.fNeedsCaretInfo) + { + /* Check trailing */ + if (glyph_index != cluster_index || + (direction > 0 && abs(iPosX) <= (piAdvance[glyph_index] / 2)) || + (direction < 0 && abs(iPosX) >= (piAdvance[glyph_index] / 2))) + *piTrailing = cluster_size; + } + else + { + if (cluster_size > 1) { - int glyph; - for (glyph = clust; glyph < cGlyphs; glyph++) - special_size += get_glyph_cluster_advance(piAdvance, psva, pwLogClust, cGlyphs, cChars, glyph, direction); - iSpecial = item; - special_size /= (cChars - item); - iPosX += special_size; + /* Be part way through the glyph cluster based on size and position */ + int cluster_advance = get_cluster_advance(piAdvance, psva, pwLogClust, cGlyphs, cChars, cluster_index, direction); + double cluster_part_width = cluster_advance / (float)cluster_size; + double adv; + int part_index; + + /* back up to the beginning of the cluster */ + for (adv = iPosX, part_index = cluster_index; part_index <= glyph_index; part_index++) + adv += piAdvance[part_index]; + if (adv > iX) adv = iX; + + TRACE("Multi-char cluster, no snap\n"); + TRACE("cluster size %i, pre-cluster iPosX %f\n",cluster_size, adv); + TRACE("advance %i divides into %f per char\n", cluster_advance, cluster_part_width); + if (direction > 0) + { + for (part_index = 0; adv >= 0; adv-=cluster_part_width, part_index++) + ; + if (part_index) part_index--; + } + else + { + for (part_index = 0; adv > 0; adv-=cluster_part_width, part_index++) + ; + if (part_index > cluster_size) + { + adv += cluster_part_width; + part_index=cluster_size; + } + } + + TRACE("base_char %i part_index %i, leftover advance %f\n",i, part_index, adv); + + if (direction > 0) + i += part_index; + else + i += (cluster_size - part_index); + + /* Check trailing */ + if ((direction > 0 && fabs(adv) <= (cluster_part_width / 2.0)) || + (direction < 0 && adv && fabs(adv) >= (cluster_part_width / 2.0))) + *piTrailing = 1; } else { - if (scriptInformation[psa->eScript].props.fNeedsCaretInfo) - { - if (!cjump) - iPosX += advance; - cjump++; - } - else - iPosX += advance / (float)clust_size; + /* Check trailing */ + if ((direction > 0 && abs(iPosX) <= (piAdvance[glyph_index] / 2)) || + (direction < 0 && abs(iPosX) >= (piAdvance[glyph_index] / 2))) + *piTrailing = 1; } } - else if (iSpecial != -1) - iPosX += special_size; - else /* (iCluster != -1) */ - { - int adv = get_glyph_cluster_advance(piAdvance, psva, pwLogClust, cGlyphs, cChars, pwLogClust[iCluster], direction); - if (scriptInformation[psa->eScript].props.fNeedsCaretInfo) - { - if (!cjump) - iPosX += adv; - cjump++; - } + } + else + { + TRACE("Point falls outside of string\n"); + if (glyph_index < 0) + i = cChars-1; + else /* (glyph_index >= cGlyphs) */ + i = cChars; + + /* If not snaping in the reverse direction (such as Hebrew) Then 0 + point flow to the next character */ + if (direction < 0) + { + if (!scriptInformation[psa->eScript].props.fNeedsCaretInfo && abs(iPosX) == piAdvance[glyph_index]) + i++; else - iPosX += adv / (float)clust_size; - } - } - - if (direction > 0) - { - if (iPosX > iX) - item--; - if (item < cChars && ((iPosX - iLastPosX) / 2.0) + iX >= iPosX) - { - if (scriptInformation[psa->eScript].props.fNeedsCaretInfo && clust_size > 1) - item+=(clust_size-1); - *piTrailing = 1; - } - else - *piTrailing = 0; - } - else - { - if (iX == iLastPosX) - item++; - if (iX >= iLastPosX && iX <= iPosX) - item++; - - if (iLastPosX == iX) - *piTrailing = 0; - else if (item < 0 || ((iLastPosX - iPosX) / 2.0) + iX <= iLastPosX) - { - if (scriptInformation[psa->eScript].props.fNeedsCaretInfo && clust_size > 1) - item-=(clust_size-1); - *piTrailing = 1; - } - else - *piTrailing = 0; - } - - *piCP = item; + *piTrailing = 1; + } + } + + *piCP = i; TRACE("*piCP=%d\n", *piCP); TRACE("*piTrailing=%d\n", *piTrailing); @@ -3095,7 +3305,11 @@ for (i = 0; i < cGlyphs; i++) { ABC abc; - if (!get_cache_glyph_widths(psc, pwGlyphs[i], &abc)) + if (pGlyphProps[i].sva.fZeroWidth) + { + abc.abcA = abc.abcB = abc.abcC = 0; + } + else if (!get_cache_glyph_widths(psc, pwGlyphs[i], &abc)) { if (!hdc) return E_PENDING; if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex) @@ -3420,7 +3634,6 @@ if (!indexs) return E_OUTOFMEMORY; - if (vistolog) { for( ich = 0; ich < runs; ich++) @@ -3429,10 +3642,8 @@ ich = 0; while (ich < runs) ich += BIDI_ReorderV2lLevel(0, indexs+ich, level+ich, runs - ich, FALSE); - for (ich = 0; ich < runs; ich++) - vistolog[ich] = indexs[ich]; - } - + memcpy(vistolog, indexs, runs * sizeof(*vistolog)); + } if (logtovis) { @@ -3442,8 +3653,7 @@ ich = 0; while (ich < runs) ich += BIDI_ReorderL2vLevel(0, indexs+ich, level+ich, runs - ich, FALSE); - for (ich = 0; ich < runs; ich++) - logtovis[ich] = indexs[ich]; + memcpy(logtovis, indexs, runs * sizeof(*logtovis)); } heap_free(indexs); Modified: trunk/reactos/dll/win32/usp10/usp10_internal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10_inte…
============================================================================== --- trunk/reactos/dll/win32/usp10/usp10_internal.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/usp10/usp10_internal.h [iso-8859-1] Sat Mar 5 10:30:03 2016 @@ -244,7 +244,7 @@ int USP10_FindGlyphInLogClust(const WORD* pwLogClust, int cChars, WORD target) DECLSPEC_HIDDEN; BOOL BIDI_DetermineLevels( LPCWSTR lpString, INT uCount, const SCRIPT_STATE *s, - const SCRIPT_CONTROL *c, WORD *lpOutLevels ) DECLSPEC_HIDDEN; + const SCRIPT_CONTROL *c, WORD *lpOutLevels, WORD *lpOutOverrides ) DECLSPEC_HIDDEN; BOOL BIDI_GetStrengths(LPCWSTR lpString, INT uCount, const SCRIPT_CONTROL *c, WORD* lpStrength) DECLSPEC_HIDDEN; INT BIDI_ReorderV2lLevel(int level, int *pIndexs, const BYTE* plevel, int cch, BOOL fReverse) DECLSPEC_HIDDEN; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Mar 5 10:30:03 2016 @@ -193,7 +193,7 @@ reactos/dll/win32/updspapi # Synced to WineStaging-1.7.55 reactos/dll/win32/url # Synced to WineStaging-1.7.55 reactos/dll/win32/urlmon # Synced to WineStaging-1.9.4 -reactos/dll/win32/usp10 # Synced to WineStaging-1.7.55 +reactos/dll/win32/usp10 # Synced to WineStaging-1.9.4 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to WineStaging-1.7.55 reactos/dll/win32/version # Synced to WineStaging-1.7.55
8 years, 9 months
1
0
0
0
[akhaldi] 70936: [TAPI32] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:26:27 2016 New Revision: 70936 URL:
http://svn.reactos.org/svn/reactos?rev=70936&view=rev
Log: [TAPI32] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/tapi32/assisted.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/tapi32/assisted.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/tapi32/assisted.…
============================================================================== --- trunk/reactos/dll/win32/tapi32/assisted.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/tapi32/assisted.c [iso-8859-1] Sat Mar 5 10:26:27 2016 @@ -46,7 +46,7 @@ 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', 'T','e','l','e','p','h','o','n','y','\\','L','o','c','a','t','i','o','n','s',0}; - if(!RegOpenKeyW(HKEY_LOCAL_MACHINE, locations_keyW, &hkey) != ERROR_SUCCESS) { + if(RegOpenKeyW(HKEY_LOCAL_MACHINE, locations_keyW, &hkey) == ERROR_SUCCESS) { valsize = sizeof( DWORD); if(!RegQueryValueExW(hkey, currentidW, 0, &type, (LPBYTE) &currid, &valsize) && type == REG_DWORD) { Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Mar 5 10:26:27 2016 @@ -187,7 +187,7 @@ reactos/dll/win32/sti # Synced to WineStaging-1.7.55 reactos/dll/win32/sxs # Synced to WineStaging-1.7.55 reactos/dll/win32/t2embed # Synced to WineStaging-1.7.55 -reactos/dll/win32/tapi32 # Synced to WineStaging-1.7.55 +reactos/dll/win32/tapi32 # Synced to WineStaging-1.9.4 reactos/dll/win32/traffic # Synced to WineStaging-1.7.55 reactos/dll/win32/twain_32 # Synced to WineStaging-1.7.55 reactos/dll/win32/updspapi # Synced to WineStaging-1.7.55
8 years, 9 months
1
0
0
0
[akhaldi] 70937: [URLMON] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:27:46 2016 New Revision: 70937 URL:
http://svn.reactos.org/svn/reactos?rev=70937&view=rev
Log: [URLMON] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/urlmon/uri.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/urlmon/uri.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/uri.c?rev…
============================================================================== --- trunk/reactos/dll/win32/urlmon/uri.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/uri.c [iso-8859-1] Sat Mar 5 10:27:46 2016 @@ -1472,7 +1472,7 @@ while((!is_res && !is_auth_delim(**ptr, known_scheme)) || (is_res && **ptr && **ptr != '/')) { if(**ptr == ':' && !ignore_col) { - /* We can ignore ':' if were inside brackets.*/ + /* We can ignore ':' if we are inside brackets.*/ if(!inside_brackets) { const WCHAR *tmp = (*ptr)++; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Mar 5 10:27:46 2016 @@ -192,7 +192,7 @@ reactos/dll/win32/twain_32 # Synced to WineStaging-1.7.55 reactos/dll/win32/updspapi # Synced to WineStaging-1.7.55 reactos/dll/win32/url # Synced to WineStaging-1.7.55 -reactos/dll/win32/urlmon # Synced to WineStaging-1.7.55 +reactos/dll/win32/urlmon # Synced to WineStaging-1.9.4 reactos/dll/win32/usp10 # Synced to WineStaging-1.7.55 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to WineStaging-1.7.55
8 years, 9 months
1
0
0
0
[akhaldi] 70938: [URLMON_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Mar 5 10:28:41 2016 New Revision: 70938 URL:
http://svn.reactos.org/svn/reactos?rev=70938&view=rev
Log: [URLMON_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/urlmon/misc.c trunk/rostests/winetests/urlmon/protocol.c trunk/rostests/winetests/urlmon/uri.c Modified: trunk/rostests/winetests/urlmon/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/misc.c?r…
============================================================================== --- trunk/rostests/winetests/urlmon/misc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/misc.c [iso-8859-1] Sat Mar 5 10:28:41 2016 @@ -1311,14 +1311,14 @@ memset(src, 0, sizeof(BINDINFO[2])); memset(dest, 0xde, sizeof(BINDINFO[2])); hres = pCopyBindInfo(src, dest); - ok(hres == E_INVALIDARG, "CopyBindInfo retuned: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CopyBindInfo returned: %08x, expected E_INVALIDARG\n", hres); memset(src, 0, sizeof(BINDINFO[2])); memset(dest, 0xde, sizeof(BINDINFO[2])); src[0].cbSize = sizeof(BINDINFO); dest[0].cbSize = 0; hres = pCopyBindInfo(src, dest); - ok(hres == E_INVALIDARG, "CopyBindInfo retuned: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CopyBindInfo returned: %08x, expected E_INVALIDARG\n", hres); memset(src, 0, sizeof(BINDINFO[2])); memset(dest, 0xde, sizeof(BINDINFO[2])); Modified: trunk/rostests/winetests/urlmon/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/protocol…
============================================================================== --- trunk/rostests/winetests/urlmon/protocol.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/protocol.c [iso-8859-1] Sat Mar 5 10:28:41 2016 @@ -1382,7 +1382,7 @@ CHECK_EXPECT(GetBindString_USER_AGENT); ok(cEl == 1, "cEl=%d, expected 1\n", cEl); if(pcElFetched) { - ok(*pcElFetched == 0, "*pcElFetch=%d, expectd 0\n", *pcElFetched); + ok(*pcElFetched == 0, "*pcElFetch=%d, expected 0\n", *pcElFetched); *pcElFetched = 1; } if(ppwzStr) { @@ -1394,14 +1394,14 @@ CHECK_EXPECT(GetBindString_POST_COOKIE); ok(cEl == 1, "cEl=%d, expected 1\n", cEl); if(pcElFetched) - ok(*pcElFetched == 0, "*pcElFetch=%d, expectd 0\n", *pcElFetched); + ok(*pcElFetched == 0, "*pcElFetch=%d, expected 0\n", *pcElFetched); return S_OK; case BINDSTRING_URL: { DWORD size; CHECK_EXPECT(GetBindString_URL); ok(cEl == 1, "cEl=%d, expected 1\n", cEl); - ok(*pcElFetched == 0, "*pcElFetch=%d, expectd 0\n", *pcElFetched); + ok(*pcElFetched == 0, "*pcElFetch=%d, expected 0\n", *pcElFetched); *pcElFetched = 1; size = (lstrlenW(binding_urls[tested_protocol])+1)*sizeof(WCHAR); Modified: trunk/rostests/winetests/urlmon/uri.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/uri.c?re…
============================================================================== --- trunk/rostests/winetests/urlmon/uri.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/uri.c [iso-8859-1] Sat Mar 5 10:28:41 2016 @@ -7437,13 +7437,7 @@ switch(prop->property) { case Uri_PROPERTY_FRAGMENT: hr = IUriBuilder_SetFragment(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { + todo_wine_if(prop->todo) { ok(hr == prop->expected, "Error: IUriBuilder_SetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, prop->expected, test_index); @@ -7451,13 +7445,7 @@ break; case Uri_PROPERTY_HOST: hr = IUriBuilder_SetHost(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { + todo_wine_if(prop->todo) { ok(hr == prop->expected, "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, prop->expected, test_index); @@ -7465,13 +7453,7 @@ break; case Uri_PROPERTY_PASSWORD: hr = IUriBuilder_SetPassword(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { + todo_wine_if(prop->todo) { ok(hr == prop->expected, "Error: IUriBuilder_SetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, prop->expected, test_index); @@ -7479,13 +7461,7 @@ break; case Uri_PROPERTY_PATH: hr = IUriBuilder_SetPath(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { + todo_wine_if(prop->todo) { ok(hr == prop->expected, "Error: IUriBuilder_SetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, prop->expected, test_index); @@ -7493,13 +7469,7 @@ break; case Uri_PROPERTY_QUERY: hr = IUriBuilder_SetQuery(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { + todo_wine_if(prop->todo) { ok(hr == prop->expected, "Error: IUriBuilder_SetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, prop->expected, test_index); @@ -7507,13 +7477,7 @@ break; case Uri_PROPERTY_SCHEME_NAME: hr = IUriBuilder_SetSchemeName(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { + todo_wine_if(prop->todo) { ok(hr == prop->expected, "Error: IUriBuilder_SetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, prop->expected, test_index); @@ -7521,13 +7485,7 @@ break; case Uri_PROPERTY_USER_NAME: hr = IUriBuilder_SetUserName(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { + todo_wine_if(prop->todo) { ok(hr == prop->expected, "Error: IUriBuilder_SetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, prop->expected, test_index); @@ -7594,15 +7552,9 @@ uriW = a2w(test.uri); hr = pCreateUri(uriW, test.flags, 0, &uri); - if(test.todo) { - todo_wine { - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x on invalid_uri_tests[%d].\n", - hr, E_INVALIDARG, i); - } - } else { + todo_wine_if(test.todo) ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x on invalid_uri_tests[%d].\n", hr, E_INVALIDARG, i); - } if(uri) IUri_Release(uri); heap_free(uriW); @@ -7651,15 +7603,9 @@ uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { + todo_wine_if(test.create_todo) ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", hr, test.create_expected, i); - } if(SUCCEEDED(hr)) { DWORD j; @@ -7670,17 +7616,7 @@ uri_str_property prop = test.str_props[j]; hr = IUri_GetPropertyBSTR(uri, j, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "GetPropertyBSTR returned 0x%08x, expected 0x%08x. On uri_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Expected %s but got %s on uri_tests[%d].str_props[%d].\n", - prop.value, wine_dbgstr_w(received), i, j); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "GetPropertyBSTR returned 0x%08x, expected 0x%08x. On uri_tests[%d].str_props[%d].\n", hr, prop.expected, i, j); ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), @@ -7724,15 +7660,9 @@ uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { + todo_wine_if(test.create_todo) ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", hr, test.create_expected, i); - } if(SUCCEEDED(hr)) { DWORD j; @@ -7743,16 +7673,7 @@ uri_dword_property prop = test.dword_props[j]; hr = IUri_GetPropertyDWORD(uri, j+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "GetPropertyDWORD returned 0x%08x, expected 0x%08x. On uri_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(prop.value == received, "Expected %d but got %d on uri_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "GetPropertyDWORD returned 0x%08x, expected 0x%08x. On uri_tests[%d].dword_props[%d].\n", hr, prop.expected, i, j); ok(prop.value == received, "Expected %d but got %d on uri_tests[%d].dword_props[%d].\n", @@ -7831,15 +7752,9 @@ uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { + todo_wine_if(test.create_todo) ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, test.create_expected, i); - } if(SUCCEEDED(hr)) { uri_str_property prop; @@ -7848,17 +7763,7 @@ /* GetAbsoluteUri() tests. */ prop = test.str_props[Uri_PROPERTY_ABSOLUTE_URI]; hr = IUri_GetAbsoluteUri(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), @@ -7871,16 +7776,7 @@ /* GetAuthority() tests. */ prop = test.str_props[Uri_PROPERTY_AUTHORITY]; hr = IUri_GetAuthority(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -7892,17 +7788,7 @@ /* GetDisplayUri() tests. */ prop = test.str_props[Uri_PROPERTY_DISPLAY_URI]; hr = IUri_GetDisplayUri(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetDisplayUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s on uri_test[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetDisplayUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), @@ -7915,16 +7801,7 @@ /* GetDomain() tests. */ prop = test.str_props[Uri_PROPERTY_DOMAIN]; hr = IUri_GetDomain(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -7936,16 +7813,7 @@ /* GetExtension() tests. */ prop = test.str_props[Uri_PROPERTY_EXTENSION]; hr = IUri_GetExtension(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -7957,16 +7825,7 @@ /* GetFragment() tests. */ prop = test.str_props[Uri_PROPERTY_FRAGMENT]; hr = IUri_GetFragment(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -7978,16 +7837,7 @@ /* GetHost() tests. */ prop = test.str_props[Uri_PROPERTY_HOST]; hr = IUri_GetHost(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -7999,16 +7849,7 @@ /* GetPassword() tests. */ prop = test.str_props[Uri_PROPERTY_PASSWORD]; hr = IUri_GetPassword(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -8020,16 +7861,7 @@ /* GetPath() tests. */ prop = test.str_props[Uri_PROPERTY_PATH]; hr = IUri_GetPath(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPath returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetPath returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -8041,16 +7873,7 @@ /* GetPathAndQuery() tests. */ prop = test.str_props[Uri_PROPERTY_PATH_AND_QUERY]; hr = IUri_GetPathAndQuery(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPathAndQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetPathAndQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -8062,16 +7885,7 @@ /* GetQuery() tests. */ prop = test.str_props[Uri_PROPERTY_QUERY]; hr = IUri_GetQuery(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -8083,16 +7897,7 @@ /* GetRawUri() tests. */ prop = test.str_props[Uri_PROPERTY_RAW_URI]; hr = IUri_GetRawUri(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetRawUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetRawUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -8104,16 +7909,7 @@ /* GetSchemeName() tests. */ prop = test.str_props[Uri_PROPERTY_SCHEME_NAME]; hr = IUri_GetSchemeName(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetSchemeName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetSchemeName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -8125,16 +7921,7 @@ /* GetUserInfo() tests. */ prop = test.str_props[Uri_PROPERTY_USER_INFO]; hr = IUri_GetUserInfo(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetUserInfo returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetUserInfo returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -8146,16 +7933,7 @@ /* GetUserName() tests. */ prop = test.str_props[Uri_PROPERTY_USER_NAME]; hr = IUri_GetUserName(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetUserName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetUserName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", @@ -8200,15 +7978,9 @@ uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { + todo_wine_if(test.create_todo) ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, test.create_expected, i); - } if(SUCCEEDED(hr)) { uri_dword_property prop; @@ -8222,15 +7994,7 @@ /* GetHostType() tests. */ prop = test.dword_props[Uri_PROPERTY_HOST_TYPE-Uri_PROPERTY_DWORD_START]; hr = IUri_GetHostType(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetHostType returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetHostType returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); @@ -8240,15 +8004,7 @@ /* GetPort() tests. */ prop = test.dword_props[Uri_PROPERTY_PORT-Uri_PROPERTY_DWORD_START]; hr = IUri_GetPort(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPort returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetPort returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); @@ -8258,15 +8014,7 @@ /* GetScheme() tests. */ prop = test.dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START]; hr = IUri_GetScheme(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetScheme returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetScheme returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); @@ -8276,15 +8024,7 @@ /* GetZone() tests. */ prop = test.dword_props[Uri_PROPERTY_ZONE-Uri_PROPERTY_DWORD_START]; hr = IUri_GetZone(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetZone returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetZone returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", hr, prop.expected, i); ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); @@ -8324,15 +8064,9 @@ uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { + todo_wine_if(test.create_todo) ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_test[%d].\n", hr, test.create_expected, i); - } if(SUCCEEDED(hr)) { DWORD j; @@ -8347,17 +8081,7 @@ receivedLen = -1; hr = IUri_GetPropertyLength(uri, j, &receivedLen, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPropertyLength returned 0x%08x, expected 0x%08x on uri_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(receivedLen == expectedLen || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)), - "Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].\n", - expectedLen, receivedLen, i, j); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: GetPropertyLength returned 0x%08x, expected 0x%08x on uri_tests[%d].str_props[%d].\n", hr, prop.expected, i, j); ok(receivedLen == expectedLen || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)), @@ -8410,13 +8134,8 @@ uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, test.create_expected); - } - } else { + todo_wine_if(test.create_todo) ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, test.create_expected); - } if(SUCCEEDED(hr)) { DWORD received = 0, expected_props; @@ -8463,13 +8182,8 @@ uriW = a2w(test.uri); hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, test.create_expected); - } - } else { + todo_wine_if(test.create_todo) ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, test.create_expected); - } if(SUCCEEDED(hr)) { DWORD expected_props, j; @@ -8540,10 +8254,7 @@ equal = -1; hres = IUri_IsEqual(uriA, uriB, &equal); - if(test.todo) todo_wine { - ok(hres == S_OK, "Error: IsEqual returned 0x%08x, expected 0x%08x on equality_tests[%d].\n", hres, S_OK, i); - ok(equal == test.equal, "Error: Expected the comparison to be %d on equality_tests[%d].\n", test.equal, i); - } else { + todo_wine_if(test.todo) { ok(hres == S_OK, "Error: IsEqual returned 0x%08x, expected 0x%08x on equality_tests[%d].\n", hres, S_OK, i); ok(equal == test.equal, "Error: Expected the comparison to be %d on equality_tests[%d].\n", test.equal, i); } @@ -8602,13 +8313,7 @@ fragW = a2w(test.fragment); hr = pCreateUriWithFragment(uriW, fragW, test.create_flags, 0, &uri); - if(test.expected_todo) { - todo_wine { - ok(hr == test.create_expected, - "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x on uri_fragment_tests[%d].\n", - hr, test.create_expected, i); - } - } else + todo_wine_if(test.expected_todo) ok(hr == test.create_expected, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x on uri_fragment_tests[%d].\n", hr, test.create_expected, i); @@ -8617,18 +8322,7 @@ BSTR received = NULL; hr = IUri_GetAbsoluteUri(uri, &received); - if(test.expected_todo) { - todo_wine { - ok(hr == S_OK, - "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_fragment_tests[%d].\n", - hr, S_OK, i); - } - todo_wine { - ok(!strcmp_aw(test.expected_uri, received), - "Error: Expected %s but got %s on uri_fragment_tests[%d].\n", - test.expected_uri, wine_dbgstr_w(received), i); - } - } else { + todo_wine_if(test.expected_todo) { ok(hr == S_OK, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_fragment_tests[%d].\n", hr, S_OK, i); ok(!strcmp_aw(test.expected_uri, received), "Error: Expected %s but got %s on uri_fragment_tests[%d].\n", @@ -8680,17 +8374,10 @@ IUri *uri = NULL; hr = IUriBuilder_CreateUri(builder, test->uri_flags, 0, 0, &uri); - if(test->uri_todo) { - todo_wine { - ok(hr == test->uri_hres, - "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_hres, test_index); - } - } else { + todo_wine_if(test->uri_todo) ok(hr == test->uri_hres, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, test->uri_hres, test_index); - } if(SUCCEEDED(hr)) { DWORD i; @@ -8700,29 +8387,15 @@ BSTR received = NULL; hr = IUri_GetPropertyBSTR(uri, i, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(hr == prop.result, "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", hr, prop.result, test_index, i); - } if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(!strcmp_aw(prop.expected, received), "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", prop.expected, wine_dbgstr_w(received), test_index, i); - } } SysFreeString(received); } @@ -8732,29 +8405,15 @@ DWORD received = -2; hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(hr == prop.result, "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", hr, prop.result, test_index, i); - } if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(received == prop.expected, "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", prop.expected, received, test_index, i); - } } } } @@ -8767,17 +8426,10 @@ IUri *uri = NULL; hr = IUriBuilder_CreateUriSimple(builder, test->uri_simple_encode_flags, 0, &uri); - if(test->uri_simple_todo) { - todo_wine { - ok(hr == test->uri_simple_hres, - "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_simple_hres, test_index); - } - } else { + todo_wine_if(test->uri_simple_todo) ok(hr == test->uri_simple_hres, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, test->uri_simple_hres, test_index); - } if(SUCCEEDED(hr)) { DWORD i; @@ -8787,29 +8439,15 @@ BSTR received = NULL; hr = IUri_GetPropertyBSTR(uri, i, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(hr == prop.result, "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", hr, prop.result, test_index, i); - } if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(!strcmp_aw(prop.expected, received), "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", prop.expected, wine_dbgstr_w(received), test_index, i); - } } SysFreeString(received); } @@ -8819,29 +8457,15 @@ DWORD received = -2; hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(hr == prop.result, "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", hr, prop.result, test_index, i); - } if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(received == prop.expected, "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", prop.expected, received, test_index, i); - } } } } @@ -8855,17 +8479,10 @@ hr = IUriBuilder_CreateUriWithFlags(builder, test->uri_with_flags, test->uri_with_builder_flags, test->uri_with_encode_flags, 0, &uri); - if(test->uri_with_todo) { - todo_wine { - ok(hr == test->uri_with_hres, - "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_with_hres, test_index); - } - } else { + todo_wine_if(test->uri_with_todo) ok(hr == test->uri_with_hres, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, test->uri_with_hres, test_index); - } if(SUCCEEDED(hr)) { DWORD i; @@ -8875,29 +8492,15 @@ BSTR received = NULL; hr = IUri_GetPropertyBSTR(uri, i, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(hr == prop.result, "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", hr, prop.result, test_index, i); - } if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(!strcmp_aw(prop.expected, received), "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", prop.expected, wine_dbgstr_w(received), test_index, i); - } } SysFreeString(received); } @@ -8907,29 +8510,15 @@ DWORD received = -2; hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(hr == prop.result, "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", hr, prop.result, test_index, i); - } if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } else { + todo_wine_if(prop.todo) ok(received == prop.expected, "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", prop.expected, received, test_index, i); - } } } } @@ -9169,32 +8758,17 @@ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetFragment(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); - } - } - } else { + todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); + if(SUCCEEDED(hr)) { + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + expected, wine_dbgstr_w(received), test_index); + ok(expected_len == len, + "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + expected_len, len, test_index); + } } } else { /* The property wasn't set earlier, so it should return whatever @@ -9279,32 +8853,17 @@ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetHost(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); - } - } - } else { + todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); + if(SUCCEEDED(hr)) { + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + expected, wine_dbgstr_w(received), test_index); + ok(expected_len == len, + "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + expected_len, len, test_index); + } } } else { /* The property wasn't set earlier, so it should return whatever @@ -9389,32 +8948,17 @@ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetPassword(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); - } - } - } else { + todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); + if(SUCCEEDED(hr)) { + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + expected, wine_dbgstr_w(received), test_index); + ok(expected_len == len, + "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + expected_len, len, test_index); + } } } else { /* The property wasn't set earlier, so it should return whatever @@ -9499,32 +9043,17 @@ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetPath(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); - } - } - } else { + todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); + if(SUCCEEDED(hr)) { + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + expected, wine_dbgstr_w(received), test_index); + ok(expected_len == len, + "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + expected_len, len, test_index); + } } } else { /* The property wasn't set earlier, so it should return whatever @@ -9597,37 +9126,19 @@ DWORD received = -1; if(test->port_prop.change) { - DWORD expected = test->port_prop.value; - hr = IUriBuilder_GetPort(builder, &has_port, &received); - if(test->port_prop.todo) { - todo_wine { - ok(hr == S_OK, - "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(has_port == test->port_prop.set, - "Error: Expected has_port to be %d but was %d instead on uri_builder_tests[%d].\n", - test->port_prop.set, has_port, test_index); - } - todo_wine { - ok(received == expected, - "Error: Expected received to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected, received, test_index); - } - } - } else { + todo_wine_if(test->port_prop.todo) { ok(hr == S_OK, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, S_OK, test_index); - ok(has_port == test->port_prop.set, - "Error: Expected has_port to be %d, but was %d instead on uri_builder_tests[%d].\n", - test->port_prop.set, has_port, test_index); - ok(received == test->port_prop.value, - "Error: Expected port to be %d, but was %d instead on uri_builder_tests[%d].\n", - test->port_prop.value, received, test_index); + if(SUCCEEDED(hr)) { + ok(has_port == test->port_prop.set, + "Error: Expected has_port to be %d, but was %d instead on uri_builder_tests[%d].\n", + test->port_prop.set, has_port, test_index); + ok(received == test->port_prop.value, + "Error: Expected port to be %d, but was %d instead on uri_builder_tests[%d].\n", + test->port_prop.value, received, test_index); + } } } else { IUri *uri = NULL; @@ -9694,32 +9205,17 @@ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetQuery(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); - } - } - } else { + todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); + if(SUCCEEDED(hr)) { + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + expected, wine_dbgstr_w(received), test_index); + ok(expected_len == len, + "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + expected_len, len, test_index); + } } } else { /* The property wasn't set earlier, so it should return whatever @@ -9804,32 +9300,17 @@ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetSchemeName(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); - } - } - } else { + todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); + if(SUCCEEDED(hr)) { + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + expected, wine_dbgstr_w(received), test_index); + ok(expected_len == len, + "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + expected_len, len, test_index); + } } } else { /* The property wasn't set earlier, so it should return whatever @@ -9914,32 +9395,17 @@ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetUserName(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); - } - } - } else { + todo_wine_if(prop->todo) { ok(hr == (expected ? S_OK : S_FALSE), "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(expected_len == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected_len, len, test_index); + if(SUCCEEDED(hr)) { + ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", + expected, wine_dbgstr_w(received), test_index); + ok(expected_len == len, + "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", + expected_len, len, test_index); + } } } else { /* The property wasn't set earlier, so it should return whatever @@ -10024,17 +9490,10 @@ if(FAILED(hr)) continue; } hr = pCreateIUriBuilder(uri, 0, 0, &builder); - if(test.create_builder_todo) { - todo_wine { - ok(hr == test.create_builder_expected, - "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test.create_builder_expected, i); - } - } else { + todo_wine_if(test.create_builder_todo) ok(hr == test.create_builder_expected, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, test.create_builder_expected, i); - } if(SUCCEEDED(hr)) { DWORD j; BOOL modified = FALSE, received = FALSE; @@ -10058,17 +9517,10 @@ if(test.port_prop.change) { hr = IUriBuilder_SetPort(builder, test.port_prop.set, test.port_prop.value); modified = TRUE; - if(test.port_prop.todo) { - todo_wine { - ok(hr == test.port_prop.expected, - "Error: IUriBuilder_SetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test.port_prop.expected, i); - } - } else { + todo_wine_if(test.port_prop.todo) ok(hr == test.port_prop.expected, "Error: IUriBuilder_SetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", hr, test.port_prop.expected, i); - } } hr = IUriBuilder_HasBeenModified(builder, &received); @@ -10388,45 +9840,25 @@ builder = NULL; hr = pCreateIUriBuilder(uri, 0, 0, &builder); - if(test.create_builder_todo) { - todo_wine { - ok(hr == test.create_builder_expected, - "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.create_builder_expected, i); - } - } else { + todo_wine_if(test.create_builder_todo) ok(hr == test.create_builder_expected, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on test %d.\n", hr, test.create_builder_expected, i); - } + if(SUCCEEDED(hr)) { hr = IUriBuilder_RemoveProperties(builder, test.remove_properties); - if(test.remove_todo) { - todo_wine { - ok(hr == test.remove_expected, - "Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.remove_expected, i); - } - } else { + todo_wine_if(test.remove_todo) ok(hr == test.remove_expected, "Error: IUriBuilder returned 0x%08x, expected 0x%08x on test %d.\n", hr, test.remove_expected, i); - } if(SUCCEEDED(hr)) { IUri *result = NULL; hr = IUriBuilder_CreateUri(builder, test.expected_flags, 0, 0, &result); - if(test.expected_todo) { - todo_wine { - ok(hr == test.expected_hres, - "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.expected_hres, i); - } - } else { + todo_wine_if(test.expected_todo) ok(hr == test.expected_hres, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on test %d.\n", hr, test.expected_hres, i); - } if(SUCCEEDED(hr)) { BSTR received = NULL; @@ -10607,17 +10039,10 @@ result = NULL; hr = pCoInternetCombineIUri(base, relative, uri_combine_tests[i].combine_flags, &result, 0); - if(uri_combine_tests[i].todo) { - todo_wine { - ok(hr == uri_combine_tests[i].expected, - "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", - hr, uri_combine_tests[i].expected, i); - } - } else { + todo_wine_if(uri_combine_tests[i].todo) ok(hr == uri_combine_tests[i].expected, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", hr, uri_combine_tests[i]. expected, i); - } if(SUCCEEDED(hr)) { DWORD j; @@ -10626,19 +10051,7 @@ BSTR received; hr = IUri_GetPropertyBSTR(result, j, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(!strcmp_aw(prop.value, received) || - broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected \"%s\" but got %s instead on uri_combine_tests[%d].str_props[%d].\n", - prop.value, wine_dbgstr_w(received), i, j); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", hr, prop.expected, i, j); @@ -10655,17 +10068,7 @@ DWORD received; hr = IUri_GetPropertyDWORD(result, j+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected || broken(prop.broken_combine_hres && hr == S_FALSE), "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", hr, prop.expected, i, j); @@ -10923,17 +10326,10 @@ hr = pCoInternetCombineUrlEx(base, relativeW, uri_combine_tests[i].combine_flags, &result, 0); - if(uri_combine_tests[i].todo) { - todo_wine { - ok(hr == uri_combine_tests[i].expected, - "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", - hr, uri_combine_tests[i].expected, i); - } - } else { + todo_wine_if(uri_combine_tests[i].todo) ok(hr == uri_combine_tests[i].expected, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", hr, uri_combine_tests[i]. expected, i); - } if(SUCCEEDED(hr)) { DWORD j; @@ -10943,19 +10339,7 @@ LPCSTR value = (prop.value_ex) ? prop.value_ex : prop.value; hr = IUri_GetPropertyBSTR(result, j, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(!strcmp_aw(value, received) || - broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected \"%s\" but got %s instead on uri_combine_tests[%d].str_props[%d].\n", - value, wine_dbgstr_w(received), i, j); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected, "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", hr, prop.expected, i, j); @@ -10972,17 +10356,7 @@ DWORD received; hr = IUri_GetPropertyDWORD(result, j+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } else { + todo_wine_if(prop.todo) { ok(hr == prop.expected || broken(prop.broken_combine_hres && hr == S_FALSE), "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", hr, prop.expected, i, j); @@ -11111,17 +10485,10 @@ DWORD result_len = -1; hr = pCoInternetParseIUri(uri, test.action, test.flags, result, INTERNET_MAX_URL_LENGTH+1, &result_len, 0); - if(test.todo) { - todo_wine { - ok(hr == test.expected, - "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x on uri_parse_tests[%d].\n", - hr, test.expected, i); - } - } else { + todo_wine_if(test.todo) ok(hr == test.expected, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x on uri_parse_tests[%d].\n", hr, test.expected, i); - } if(SUCCEEDED(hr)) { DWORD len = lstrlenA(test.property); ok(!strcmp_aw(test.property, result),
8 years, 9 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
27
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Results per page:
10
25
50
100
200