[PATCH 1/5] usp10/tests: Add an itemisation test for Persian numerals and punctuation.

Aric Stewart aric at codeweavers.com
Tue Jun 7 07:08:35 CDT 2016


Signed-off-by: Aric Stewart <aric at codeweavers.com>

On 6/5/16 1:05 PM, Henri Verbeet wrote:
> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
> ---
>  dlls/usp10/tests/usp10.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
> index d0c698f..cf05ed8 100644
> --- a/dlls/usp10/tests/usp10.c
> +++ b/dlls/usp10/tests/usp10.c
> @@ -568,6 +568,26 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE},
>      static const itemTest t561[] = {{{0,0,0,0,0,0},0,1,1,1,0,arab_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}};
>      static const itemTest t562[] = {{{0,0,0,0,0,0},0,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0},6,0,0,0,0,-1,FALSE}};
>  
> +    /* Persian numerals and punctuation. */
> +    static const WCHAR test57[] = {0x06f1, 0x06f2, 0x066c, 0x06f3, 0x06f4, 0x06f5, 0x066c,  /* ۱۲٬۳۴۵٬ */
> +                                   0x06f6, 0x06f7, 0x06f8, 0x066b, 0x06f9, 0x06f0};         /* ۶۷۸٫۹۰ */
> +    static const itemTest t571[] = {{{0,1,0,1,1,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,1,0,1,0,0}, 2,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,1,0,1,1,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,1,0,1,0,0}, 6,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,1,0,1,1,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,1,0,1,0,0},10,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,1,0,1,1,0},11,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}};
> +    static const itemTest t572[] = {{{0,0,0,1,1,0}, 0,0,0,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 2,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,0,0,1,1,0}, 3,0,0,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 6,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,0,0,1,1,0}, 7,0,0,2,0,arab_tag,FALSE},{{0,0,1,0,0,0},10,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,0,0,1,1,0},11,0,0,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}};
> +    static const itemTest t573[] = {{{0,0,0,0,1,0}, 0,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0}, 2,0,0,0,1,arab_tag,FALSE},
> +                                    {{0,0,0,0,1,0}, 3,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0}, 6,0,0,0,1,arab_tag,FALSE},
> +                                    {{0,0,0,0,1,0}, 7,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0},10,0,0,0,1,arab_tag,FALSE},
> +                                    {{0,0,0,0,1,0},11,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}};
> +    static const itemTest t574[] = {{{0,0,1,0,1,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 2,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,0,1,0,1,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 6,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,0,1,0,1,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,0,1,0,0,0},10,0,1,2,0,arab_tag,FALSE},
> +                                    {{0,0,1,0,1,0},11,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}};
> +
>      SCRIPT_ITEM items[15];
>      SCRIPT_CONTROL  Control;
>      SCRIPT_STATE    State;
> @@ -649,6 +669,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE},
>      test_items_ok(test46,16,NULL,NULL,1,t461,FALSE,0);
>      test_items_ok(test47,26,NULL,NULL,1,t471,FALSE,0);
>      test_items_ok(test56,6,NULL,NULL,1,t561,FALSE,0);
> +    test_items_ok(test57,13,NULL,NULL,7,t571,FALSE,0);
>  
>      State.uBidiLevel = 0;
>      test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0);
> @@ -712,6 +733,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE},
>      test_items_ok(test54,7,&Control,&State,2,t541,FALSE,0);
>      test_items_ok(test55,8,&Control,&State,2,t551,FALSE,0);
>      test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0);
> +    test_items_ok(test57,13,&Control,&State,7,t572,FALSE,0);
>  
>      State.uBidiLevel = 1;
>      test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0);
> @@ -767,6 +789,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE},
>      test_items_ok(test46,16,&Control,&State,1,t462,FALSE,0);
>      test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0);
>      test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0);
> +    test_items_ok(test57,13,&Control,&State,7,t574,FALSE,0);
>  
>      State.uBidiLevel = 1;
>      Control.fMergeNeutralItems = TRUE;
> @@ -823,6 +846,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE},
>      test_items_ok(test46,16,&Control,&State,1,t462,FALSE,0);
>      test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0);
>      test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0);
> +    test_items_ok(test57,13,&Control,&State,7,t574,FALSE,0);
>  
>      State.uBidiLevel = 0;
>      Control.fMergeNeutralItems = FALSE;
> @@ -888,6 +912,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE},
>      test_items_ok(test54,7,&Control,&State,2,t542,FALSE,0);
>      test_items_ok(test55,8,&Control,&State,2,t552,FALSE,0);
>      test_items_ok(test56,6,&Control,&State,1,t562,FALSE,0);
> +    test_items_ok(test57,13,&Control,&State,7,t573,FALSE,0);
>  }
>  
>  static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,
> 



More information about the wine-patches mailing list