summaryrefslogtreecommitdiff
path: root/tests/unilbrk/test-ulc-possible-linebreaks.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unilbrk/test-ulc-possible-linebreaks.c')
-rw-r--r--tests/unilbrk/test-ulc-possible-linebreaks.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/unilbrk/test-ulc-possible-linebreaks.c b/tests/unilbrk/test-ulc-possible-linebreaks.c
index 70c572ca..d821cf3d 100644
--- a/tests/unilbrk/test-ulc-possible-linebreaks.c
+++ b/tests/unilbrk/test-ulc-possible-linebreaks.c
@@ -1,5 +1,5 @@
/* Test of line breaking of strings.
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,10 +37,9 @@ test_function (void (*my_ulc_possible_linebreaks) (const char *, size_t, const c
/* "Grüß Gott. x=(-b±sqrt(b²-4ac))/(2a)" */
"Gr\374\337 Gott. x=(-b\261sqrt(b\262-4ac))/(2a)\n";
char *p = (char *) malloc (SIZEOF (input));
- size_t i;
my_ulc_possible_linebreaks (input, SIZEOF (input), "ISO-8859-1", p);
- for (i = 0; i < 36; i++)
+ for (size_t i = 0; i < 36; i++)
{
ASSERT (p[i] == (i == 35 ? UC_BREAK_MANDATORY :
i == 5 || i == 11 || i == 15
@@ -55,10 +54,9 @@ test_function (void (*my_ulc_possible_linebreaks) (const char *, size_t, const c
static const char input[21] _GL_ATTRIBUTE_NONSTRING =
"<P>Some sentence.</P>";
char *p = (char *) malloc (SIZEOF (input));
- size_t i;
my_ulc_possible_linebreaks (input, SIZEOF (input), "UTF-8", p);
- for (i = 0; i < 21; i++)
+ for (size_t i = 0; i < 21; i++)
{
ASSERT (p[i] == (i == 8 || i == 17 || i == 19 ? UC_BREAK_POSSIBLE :
UC_BREAK_PROHIBITED));