diff options
Diffstat (limited to 'tests/uniwidth')
| -rw-r--r-- | tests/uniwidth/test-u16-strwidth.c | 2 | ||||
| -rw-r--r-- | tests/uniwidth/test-u16-width.c | 2 | ||||
| -rw-r--r-- | tests/uniwidth/test-u32-strwidth.c | 2 | ||||
| -rw-r--r-- | tests/uniwidth/test-u32-width.c | 2 | ||||
| -rw-r--r-- | tests/uniwidth/test-u8-strwidth.c | 2 | ||||
| -rw-r--r-- | tests/uniwidth/test-u8-width.c | 2 | ||||
| -rw-r--r-- | tests/uniwidth/test-uc_width.c | 6 | ||||
| -rw-r--r-- | tests/uniwidth/test-uc_width2.c | 6 | ||||
| -rwxr-xr-x | tests/uniwidth/test-uc_width2.sh | 28 | ||||
| -rw-r--r-- | tests/uniwidth/test-uniwidth-h.c | 26 |
10 files changed, 58 insertions, 20 deletions
diff --git a/tests/uniwidth/test-u16-strwidth.c b/tests/uniwidth/test-u16-strwidth.c index a3c55f3b..2cf8f1c2 100644 --- a/tests/uniwidth/test-u16-strwidth.c +++ b/tests/uniwidth/test-u16-strwidth.c @@ -1,5 +1,5 @@ /* Test of u16_strwidth() function. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/tests/uniwidth/test-u16-width.c b/tests/uniwidth/test-u16-width.c index 609aa9a6..1adaeb15 100644 --- a/tests/uniwidth/test-u16-width.c +++ b/tests/uniwidth/test-u16-width.c @@ -1,5 +1,5 @@ /* Test of u16_width() function. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/tests/uniwidth/test-u32-strwidth.c b/tests/uniwidth/test-u32-strwidth.c index 8101b026..cd8337cd 100644 --- a/tests/uniwidth/test-u32-strwidth.c +++ b/tests/uniwidth/test-u32-strwidth.c @@ -1,5 +1,5 @@ /* Test of u32_strwidth() function. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/tests/uniwidth/test-u32-width.c b/tests/uniwidth/test-u32-width.c index a09d0873..5630d10a 100644 --- a/tests/uniwidth/test-u32-width.c +++ b/tests/uniwidth/test-u32-width.c @@ -1,5 +1,5 @@ /* Test of u32_width() function. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/tests/uniwidth/test-u8-strwidth.c b/tests/uniwidth/test-u8-strwidth.c index 1652516f..be28a297 100644 --- a/tests/uniwidth/test-u8-strwidth.c +++ b/tests/uniwidth/test-u8-strwidth.c @@ -1,5 +1,5 @@ /* Test of u8_strwidth() function. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/tests/uniwidth/test-u8-width.c b/tests/uniwidth/test-u8-width.c index cb783b79..6fb7a9b0 100644 --- a/tests/uniwidth/test-u8-width.c +++ b/tests/uniwidth/test-u8-width.c @@ -1,5 +1,5 @@ /* Test of u8_width() function. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/tests/uniwidth/test-uc_width.c b/tests/uniwidth/test-uc_width.c index 23269d3e..fd7adcf7 100644 --- a/tests/uniwidth/test-uc_width.c +++ b/tests/uniwidth/test-uc_width.c @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-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 @@ -25,10 +25,8 @@ int main () { - ucs4_t uc; - /* Test width of ASCII characters. */ - for (uc = 0x0020; uc < 0x007F; uc++) + for (ucs4_t uc = 0x0020; uc < 0x007F; uc++) ASSERT (uc_width (uc, "ISO-8859-2") == 1); /* Test width of some non-spacing characters. */ diff --git a/tests/uniwidth/test-uc_width2.c b/tests/uniwidth/test-uc_width2.c index 26b1809a..ef2fd88a 100644 --- a/tests/uniwidth/test-uc_width2.c +++ b/tests/uniwidth/test-uc_width2.c @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2024 Free Software Foundation, Inc. + Copyright (C) 2007-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 @@ -60,9 +60,7 @@ add_to_interval (ucs4_t uc, char width) int main () { - ucs4_t uc; - - for (uc = 0; uc < 0x110000; uc++) + for (ucs4_t uc = 0; uc < 0x110000; uc++) { int w1 = uc_width (uc, "UTF-8"); int w2 = uc_width (uc, "GBK"); diff --git a/tests/uniwidth/test-uc_width2.sh b/tests/uniwidth/test-uc_width2.sh index 3fa45d39..81c07cb8 100755 --- a/tests/uniwidth/test-uc_width2.sh +++ b/tests/uniwidth/test-uc_width2.sh @@ -295,8 +295,10 @@ cat > uc_width.ok <<\EOF 1A7D..1A7E A 1A7F 0 1A80..1AAF A -1AB0..1ACE 0 -1ACF..1AFF A +1AB0..1ADD 0 +1ADE..1ADF A +1AE0..1AEB 0 +1AEC..1AFF A 1B00..1B03 0 1B04..1B33 A 1B34 0 @@ -558,8 +560,8 @@ FFFC..101FC 1 10D69..10D6D 0 10D6E..10EAA 1 10EAB..10EAC 0 -10EAD..10EFB 1 -10EFC..10EFF 0 +10EAD..10EF9 1 +10EFA..10EFF 0 10F00..10F45 1 10F46..10F50 0 10F51..10F81 1 @@ -710,7 +712,13 @@ FFFC..101FC 1 11A8A..11A96 0 11A97 1 11A98..11A99 0 -11A9A..11C2F 1 +11A9A..11B5F 1 +11B60 0 +11B61 1 +11B62..11B64 0 +11B65 1 +11B66 0 +11B67..11C2F 1 11C30..11C36 0 11C37 1 11C38..11C3D 0 @@ -843,7 +851,15 @@ FFFC..101FC 1 1E4EC..1E4EF 0 1E4F0..1E5ED 1 1E5EE..1E5EF 0 -1E5F0..1E8CF 1 +1E5F0..1E6E2 1 +1E6E3 0 +1E6E4..1E6E5 1 +1E6E6 0 +1E6E7..1E6ED 1 +1E6EE..1E6EF 0 +1E6F0..1E6F4 1 +1E6F5 0 +1E6F6..1E8CF 1 1E8D0..1E8D6 0 1E8D7..1E943 1 1E944..1E94A 0 diff --git a/tests/uniwidth/test-uniwidth-h.c b/tests/uniwidth/test-uniwidth-h.c new file mode 100644 index 00000000..70152039 --- /dev/null +++ b/tests/uniwidth/test-uniwidth-h.c @@ -0,0 +1,26 @@ +/* Test of <uniwidth.h>. + Copyright (C) 2025-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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. */ + +#include <config.h> + +/* Specification. */ +#include <uniwidth.h> + +int +main (void) +{ + return 0; +} |
