summaryrefslogtreecommitdiff
path: root/tests/uniwbrk/test-uc-wordbreaks.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-01-08 11:51:07 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-01-08 11:51:07 +0100
commitbe8efac78d067c138ad8dda03df4336e73f94887 (patch)
tree5f5254a628ba0ef72065b93d949d1c985742ea8e /tests/uniwbrk/test-uc-wordbreaks.c
parent7b65dbd4ebade81d504cfe5e681292a58ad1fdf0 (diff)
New upstream version 1.0upstream/1.0
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;