diff options
Diffstat (limited to 'tests/unilbrk/test-ulc-possible-linebreaks.c')
| -rw-r--r-- | tests/unilbrk/test-ulc-possible-linebreaks.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/unilbrk/test-ulc-possible-linebreaks.c b/tests/unilbrk/test-ulc-possible-linebreaks.c index 8267f3e0..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-2024 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 @@ -33,14 +33,13 @@ test_function (void (*my_ulc_possible_linebreaks) (const char *, size_t, const c #if HAVE_ICONV { - static const char input[36] = + static const char input[36] _GL_ATTRIBUTE_NONSTRING = /* "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 @@ -52,12 +51,12 @@ test_function (void (*my_ulc_possible_linebreaks) (const char *, size_t, const c /* Test line breaking in a string with HTML markup. */ { - static const char input[21] = "<P>Some sentence.</P>"; + 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)); |
