summaryrefslogtreecommitdiff
path: root/tests/uniwbrk
diff options
context:
space:
mode:
Diffstat (limited to 'tests/uniwbrk')
-rw-r--r--tests/uniwbrk/WordBreakTest.txt8
-rw-r--r--tests/uniwbrk/test-u16-wordbreaks.c2
-rw-r--r--tests/uniwbrk/test-u32-wordbreaks.c2
-rw-r--r--tests/uniwbrk/test-u8-wordbreaks.c2
-rw-r--r--tests/uniwbrk/test-uc-wordbreaks.c28
-rw-r--r--tests/uniwbrk/test-ulc-wordbreaks.c2
6 files changed, 21 insertions, 23 deletions
diff --git a/tests/uniwbrk/WordBreakTest.txt b/tests/uniwbrk/WordBreakTest.txt
index e4a41120..5d126f06 100644
--- a/tests/uniwbrk/WordBreakTest.txt
+++ b/tests/uniwbrk/WordBreakTest.txt
@@ -38,11 +38,11 @@
# dealings in these Data Files or Software without prior written
# authorization of the copyright holder.
-# WordBreakTest-15.1.0.txt
-# Date: 2023-03-31, 14:30:32 GMT
-# © 2023 Unicode®, Inc.
+# WordBreakTest-16.0.0.txt
+# Date: 2024-04-30, 21:48:43 GMT
+# © 2024 Unicode®, Inc.
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
-# For terms of use, see https://www.unicode.org/terms_of_use.html
+# For terms of use and license, see https://www.unicode.org/terms_of_use.html
#
# Unicode Character Database
# For documentation, see https://www.unicode.org/reports/tr44/
diff --git a/tests/uniwbrk/test-u16-wordbreaks.c b/tests/uniwbrk/test-u16-wordbreaks.c
index 002668c3..601ccb9c 100644
--- a/tests/uniwbrk/test-u16-wordbreaks.c
+++ b/tests/uniwbrk/test-u16-wordbreaks.c
@@ -124,5 +124,5 @@ main ()
free (p);
}
- return 0;
+ return test_exit_status;
}
diff --git a/tests/uniwbrk/test-u32-wordbreaks.c b/tests/uniwbrk/test-u32-wordbreaks.c
index ac9c1e36..1d272b79 100644
--- a/tests/uniwbrk/test-u32-wordbreaks.c
+++ b/tests/uniwbrk/test-u32-wordbreaks.c
@@ -124,5 +124,5 @@ main ()
free (p);
}
- return 0;
+ return test_exit_status;
}
diff --git a/tests/uniwbrk/test-u8-wordbreaks.c b/tests/uniwbrk/test-u8-wordbreaks.c
index 2aaa0e92..ecf7ba79 100644
--- a/tests/uniwbrk/test-u8-wordbreaks.c
+++ b/tests/uniwbrk/test-u8-wordbreaks.c
@@ -114,5 +114,5 @@ main ()
free (p);
}
- return 0;
+ return test_exit_status;
}
diff --git a/tests/uniwbrk/test-uc-wordbreaks.c b/tests/uniwbrk/test-uc-wordbreaks.c
index 8213446f..1c7bb101 100644
--- a/tests/uniwbrk/test-uc-wordbreaks.c
+++ b/tests/uniwbrk/test-uc-wordbreaks.c
@@ -65,10 +65,10 @@ int
main (int argc, char *argv[])
{
const char *filename;
- char line[4096];
- int exit_code;
FILE *stream;
+ int exit_code;
int lineno;
+ char line[4096];
if (argc != 2)
{
@@ -88,26 +88,24 @@ main (int argc, char *argv[])
exit_code = 0;
lineno = 0;
- while (fgets (line, sizeof line, stream))
+ while (fgets (line, sizeof (line), stream))
{
- char *comment;
- const char *p;
- uint32_t input[100];
- char breaks[101];
- char breaks_expected[101];
- int i;
-
lineno++;
- memset (breaks, 0, sizeof (breaks));
- memset (breaks_expected, 0, sizeof (breaks_expected));
-
- comment = strchr (line, '#');
+ /* Cut off the trailing comment, if any. */
+ char *comment = strchr (line, '#');
if (comment != NULL)
*comment = '\0';
+ /* Is the remaining line blank? */
if (line[strspn (line, " \t\r\n")] == '\0')
continue;
+ const char *p;
+ uint32_t input[100];
+ char breaks[100];
+ char breaks_expected[101];
+ int i;
+
i = 0;
p = line;
do
@@ -170,7 +168,7 @@ main (int argc, char *argv[])
input[j], wordbreakproperty_to_string (input_wbp));
}
fprintf (stderr, "\n");
- fprintf (stderr, "%s:%d: actual: ", filename, lineno);
+ fprintf (stderr, "%s:%d: actual: ", filename, lineno);
for (j = 0; j < i - 1; j++)
{
int input_wbp = uc_wordbreak_property (input[j]);
diff --git a/tests/uniwbrk/test-ulc-wordbreaks.c b/tests/uniwbrk/test-ulc-wordbreaks.c
index bb4b3343..b86a195d 100644
--- a/tests/uniwbrk/test-ulc-wordbreaks.c
+++ b/tests/uniwbrk/test-ulc-wordbreaks.c
@@ -58,5 +58,5 @@ main ()
}
#endif
- return 0;
+ return test_exit_status;
}