diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-01-08 11:53:52 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-01-08 11:53:52 +0100 |
commit | fa838e76139763f902c7d27cb9e1d393ed6a15e4 (patch) | |
tree | 7d0ae09775ea950056193eaa2ca93844299d46f1 /tests/uniwbrk/test-uc-wordbreaks.c | |
parent | c78359d9542c86b972aac373efcf7bc7a8a560e5 (diff) | |
parent | 2959e59fab3bab834368adefd90bd4b1b094366b (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'tests/uniwbrk/test-uc-wordbreaks.c')
-rw-r--r-- | tests/uniwbrk/test-uc-wordbreaks.c | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/tests/uniwbrk/test-uc-wordbreaks.c b/tests/uniwbrk/test-uc-wordbreaks.c index 7dbb1ec..dacb7dd 100644 --- a/tests/uniwbrk/test-uc-wordbreaks.c +++ b/tests/uniwbrk/test-uc-wordbreaks.c @@ -1,5 +1,5 @@ /* Word break function test, using test data from UCD. - Copyright (C) 2010-2018 Free Software Foundation, Inc. + Copyright (C) 2010-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -56,6 +56,7 @@ wordbreakproperty_to_string (int wbp) CASE(EM) CASE(GAZ) CASE(EBG) + CASE(WSS) } abort (); } @@ -114,12 +115,12 @@ main (int argc, char *argv[]) p += strspn (p, " \t\r\n"); if (!strncmp (p, "\303\267" /* ÷ */, 2)) { - breaks_expected[i] = 1; + breaks_expected[i] = 1; p += 2; } else if (!strncmp (p, "\303\227" /* × */, 2)) { - breaks_expected[i] = 0; + breaks_expected[i] = 0; p += 2; } else @@ -144,11 +145,11 @@ main (int argc, char *argv[]) } p += n; - input[i] = next_int; - } + input[i] = next_int; + } p += strspn (p, " \t\r\n"); - i++; + i++; } while (*p != '\0'); @@ -157,29 +158,29 @@ main (int argc, char *argv[]) /* u32_wordbreaks always set BREAKS[0] to 0. */ breaks[0] = breaks_expected[0] = 1; if (memcmp (breaks, breaks_expected, i - 1) != 0) - { - int j; - - fprintf (stderr, "%s:%d: expected: ", filename, lineno); - for (j = 0; j < i - 1; j++) - { - int input_wbp = uc_wordbreak_property (input[j]); - fprintf (stderr, "%s U+%04X (%s) ", - breaks_expected[j] == 1 ? "\303\267" : "\303\227", - input[j], wordbreakproperty_to_string (input_wbp)); - } - fprintf (stderr, "\n"); - fprintf (stderr, "%s:%d: actual: ", filename, lineno); - for (j = 0; j < i - 1; j++) - { - int input_wbp = uc_wordbreak_property (input[j]); - fprintf (stderr, "%s U+%04X (%s) ", - breaks[j] == 1 ? "\303\267" : "\303\227", - input[j], wordbreakproperty_to_string (input_wbp)); - } - fprintf (stderr, "\n"); - exit_code = 1; - } + { + int j; + + fprintf (stderr, "%s:%d: expected: ", filename, lineno); + for (j = 0; j < i - 1; j++) + { + int input_wbp = uc_wordbreak_property (input[j]); + fprintf (stderr, "%s U+%04X (%s) ", + breaks_expected[j] == 1 ? "\303\267" : "\303\227", + input[j], wordbreakproperty_to_string (input_wbp)); + } + fprintf (stderr, "\n"); + fprintf (stderr, "%s:%d: actual: ", filename, lineno); + for (j = 0; j < i - 1; j++) + { + int input_wbp = uc_wordbreak_property (input[j]); + fprintf (stderr, "%s U+%04X (%s) ", + breaks[j] == 1 ? "\303\267" : "\303\227", + input[j], wordbreakproperty_to_string (input_wbp)); + } + fprintf (stderr, "\n"); + exit_code = 1; + } } return exit_code; |