summaryrefslogtreecommitdiff
path: root/tests/uniwbrk/test-uc-wordbreaks.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-02-07 06:57:44 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-02-07 06:57:44 +0100
commit6ffaa52cf732a84c0f8259dbc9b8183960ec5c33 (patch)
treed3136c22e3e805cfc0efe78412cce905a17e0c8d /tests/uniwbrk/test-uc-wordbreaks.c
parent591cbf5878b7d4105b275585b9db1324c9dfce56 (diff)
parentaf151c593704a40e10efb28d1e3dd59a23a661f3 (diff)
Merge branch 'release/debian/1.0-1'debian/1.0-1
Diffstat (limited to 'tests/uniwbrk/test-uc-wordbreaks.c')
-rw-r--r--tests/uniwbrk/test-uc-wordbreaks.c59
1 files changed, 30 insertions, 29 deletions
diff --git a/tests/uniwbrk/test-uc-wordbreaks.c b/tests/uniwbrk/test-uc-wordbreaks.c
index 7dbb1ec0..dacb7ddd 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;