diff options
author | Bruno Haible <bruno@clisp.org> | 2011-03-21 23:14:43 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-03-21 23:14:43 +0100 |
commit | 7386da29272905ff9c3aae89143acb3dc86ae7ea (patch) | |
tree | 0f1b6353386b03e0bbb567837dc6020c56295d7e /tests | |
parent | 9ca4149056bfb051e7f567071d01c376c36ef001 (diff) | |
download | gnulib-7386da29272905ff9c3aae89143acb3dc86ae7ea.tar.gz |
Tests for module 'unictype/joininggroup-of'.
* modules/unictype/joininggroup-of-tests: New file.
* tests/unictype/test-joininggroup_of.c: New file.
* tests/unictype/test-joininggroup_of.h: New file, automatically
generated by gen-uni-tables.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unictype/test-joininggroup_of.c | 52 | ||||
-rw-r--r-- | tests/unictype/test-joininggroup_of.h | 233 |
2 files changed, 285 insertions, 0 deletions
diff --git a/tests/unictype/test-joininggroup_of.c b/tests/unictype/test-joininggroup_of.c new file mode 100644 index 0000000000..ffbdaebcb6 --- /dev/null +++ b/tests/unictype/test-joininggroup_of.c @@ -0,0 +1,52 @@ +/* Test the Unicode character Arabic joining group functions. + Copyright (C) 2011 Free Software Foundation, Inc. + Written by Bruno Haible <bruno@clisp.org>, 2011. + + 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 + 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +/* Specification. */ +#include "unictype.h" + +#include <string.h> + +#include "macros.h" + +typedef struct { ucs4_t ch; int value; } pair_t; + +static const pair_t mapping[] = + { +#include "test-joininggroup_of.h" + }; + +int +main () +{ + unsigned int c; + size_t i; + + c = 0; + for (i = 0; i < SIZEOF (mapping); i++) + { + for (; c < mapping[i].ch; c++) + ASSERT (uc_joining_group (c) == UC_JOINING_GROUP_NONE); + ASSERT (uc_joining_group (c) == mapping[i].value); + c++; + } + for (; c < 0x110000; c++) + ASSERT (uc_joining_group (c) == UC_JOINING_GROUP_NONE); + + return 0; +} diff --git a/tests/unictype/test-joininggroup_of.h b/tests/unictype/test-joininggroup_of.h new file mode 100644 index 0000000000..89fe4977ef --- /dev/null +++ b/tests/unictype/test-joininggroup_of.h @@ -0,0 +1,233 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Arabic joining group of Unicode characters. */ +/* Generated automatically by gen-uni-tables.c for Unicode 6.0.0. */ + { 0x0620, UC_JOINING_GROUP_YEH }, + { 0x0622, UC_JOINING_GROUP_ALEF }, + { 0x0623, UC_JOINING_GROUP_ALEF }, + { 0x0624, UC_JOINING_GROUP_WAW }, + { 0x0625, UC_JOINING_GROUP_ALEF }, + { 0x0626, UC_JOINING_GROUP_YEH }, + { 0x0627, UC_JOINING_GROUP_ALEF }, + { 0x0628, UC_JOINING_GROUP_BEH }, + { 0x0629, UC_JOINING_GROUP_TEH_MARBUTA }, + { 0x062A, UC_JOINING_GROUP_BEH }, + { 0x062B, UC_JOINING_GROUP_BEH }, + { 0x062C, UC_JOINING_GROUP_HAH }, + { 0x062D, UC_JOINING_GROUP_HAH }, + { 0x062E, UC_JOINING_GROUP_HAH }, + { 0x062F, UC_JOINING_GROUP_DAL }, + { 0x0630, UC_JOINING_GROUP_DAL }, + { 0x0631, UC_JOINING_GROUP_REH }, + { 0x0632, UC_JOINING_GROUP_REH }, + { 0x0633, UC_JOINING_GROUP_SEEN }, + { 0x0634, UC_JOINING_GROUP_SEEN }, + { 0x0635, UC_JOINING_GROUP_SAD }, + { 0x0636, UC_JOINING_GROUP_SAD }, + { 0x0637, UC_JOINING_GROUP_TAH }, + { 0x0638, UC_JOINING_GROUP_TAH }, + { 0x0639, UC_JOINING_GROUP_AIN }, + { 0x063A, UC_JOINING_GROUP_AIN }, + { 0x063B, UC_JOINING_GROUP_GAF }, + { 0x063C, UC_JOINING_GROUP_GAF }, + { 0x063D, UC_JOINING_GROUP_FARSI_YEH }, + { 0x063E, UC_JOINING_GROUP_FARSI_YEH }, + { 0x063F, UC_JOINING_GROUP_FARSI_YEH }, + { 0x0641, UC_JOINING_GROUP_FEH }, + { 0x0642, UC_JOINING_GROUP_QAF }, + { 0x0643, UC_JOINING_GROUP_KAF }, + { 0x0644, UC_JOINING_GROUP_LAM }, + { 0x0645, UC_JOINING_GROUP_MEEM }, + { 0x0646, UC_JOINING_GROUP_NOON }, + { 0x0647, UC_JOINING_GROUP_HEH }, + { 0x0648, UC_JOINING_GROUP_WAW }, + { 0x0649, UC_JOINING_GROUP_YEH }, + { 0x064A, UC_JOINING_GROUP_YEH }, + { 0x066E, UC_JOINING_GROUP_BEH }, + { 0x066F, UC_JOINING_GROUP_QAF }, + { 0x0671, UC_JOINING_GROUP_ALEF }, + { 0x0672, UC_JOINING_GROUP_ALEF }, + { 0x0673, UC_JOINING_GROUP_ALEF }, + { 0x0675, UC_JOINING_GROUP_ALEF }, + { 0x0676, UC_JOINING_GROUP_WAW }, + { 0x0677, UC_JOINING_GROUP_WAW }, + { 0x0678, UC_JOINING_GROUP_YEH }, + { 0x0679, UC_JOINING_GROUP_BEH }, + { 0x067A, UC_JOINING_GROUP_BEH }, + { 0x067B, UC_JOINING_GROUP_BEH }, + { 0x067C, UC_JOINING_GROUP_BEH }, + { 0x067D, UC_JOINING_GROUP_BEH }, + { 0x067E, UC_JOINING_GROUP_BEH }, + { 0x067F, UC_JOINING_GROUP_BEH }, + { 0x0680, UC_JOINING_GROUP_BEH }, + { 0x0681, UC_JOINING_GROUP_HAH }, + { 0x0682, UC_JOINING_GROUP_HAH }, + { 0x0683, UC_JOINING_GROUP_HAH }, + { 0x0684, UC_JOINING_GROUP_HAH }, + { 0x0685, UC_JOINING_GROUP_HAH }, + { 0x0686, UC_JOINING_GROUP_HAH }, + { 0x0687, UC_JOINING_GROUP_HAH }, + { 0x0688, UC_JOINING_GROUP_DAL }, + { 0x0689, UC_JOINING_GROUP_DAL }, + { 0x068A, UC_JOINING_GROUP_DAL }, + { 0x068B, UC_JOINING_GROUP_DAL }, + { 0x068C, UC_JOINING_GROUP_DAL }, + { 0x068D, UC_JOINING_GROUP_DAL }, + { 0x068E, UC_JOINING_GROUP_DAL }, + { 0x068F, UC_JOINING_GROUP_DAL }, + { 0x0690, UC_JOINING_GROUP_DAL }, + { 0x0691, UC_JOINING_GROUP_REH }, + { 0x0692, UC_JOINING_GROUP_REH }, + { 0x0693, UC_JOINING_GROUP_REH }, + { 0x0694, UC_JOINING_GROUP_REH }, + { 0x0695, UC_JOINING_GROUP_REH }, + { 0x0696, UC_JOINING_GROUP_REH }, + { 0x0697, UC_JOINING_GROUP_REH }, + { 0x0698, UC_JOINING_GROUP_REH }, + { 0x0699, UC_JOINING_GROUP_REH }, + { 0x069A, UC_JOINING_GROUP_SEEN }, + { 0x069B, UC_JOINING_GROUP_SEEN }, + { 0x069C, UC_JOINING_GROUP_SEEN }, + { 0x069D, UC_JOINING_GROUP_SAD }, + { 0x069E, UC_JOINING_GROUP_SAD }, + { 0x069F, UC_JOINING_GROUP_TAH }, + { 0x06A0, UC_JOINING_GROUP_AIN }, + { 0x06A1, UC_JOINING_GROUP_FEH }, + { 0x06A2, UC_JOINING_GROUP_FEH }, + { 0x06A3, UC_JOINING_GROUP_FEH }, + { 0x06A4, UC_JOINING_GROUP_FEH }, + { 0x06A5, UC_JOINING_GROUP_FEH }, + { 0x06A6, UC_JOINING_GROUP_FEH }, + { 0x06A7, UC_JOINING_GROUP_QAF }, + { 0x06A8, UC_JOINING_GROUP_QAF }, + { 0x06A9, UC_JOINING_GROUP_GAF }, + { 0x06AA, UC_JOINING_GROUP_SWASH_KAF }, + { 0x06AB, UC_JOINING_GROUP_GAF }, + { 0x06AC, UC_JOINING_GROUP_KAF }, + { 0x06AD, UC_JOINING_GROUP_KAF }, + { 0x06AE, UC_JOINING_GROUP_KAF }, + { 0x06AF, UC_JOINING_GROUP_GAF }, + { 0x06B0, UC_JOINING_GROUP_GAF }, + { 0x06B1, UC_JOINING_GROUP_GAF }, + { 0x06B2, UC_JOINING_GROUP_GAF }, + { 0x06B3, UC_JOINING_GROUP_GAF }, + { 0x06B4, UC_JOINING_GROUP_GAF }, + { 0x06B5, UC_JOINING_GROUP_LAM }, + { 0x06B6, UC_JOINING_GROUP_LAM }, + { 0x06B7, UC_JOINING_GROUP_LAM }, + { 0x06B8, UC_JOINING_GROUP_LAM }, + { 0x06B9, UC_JOINING_GROUP_NOON }, + { 0x06BA, UC_JOINING_GROUP_NOON }, + { 0x06BB, UC_JOINING_GROUP_NOON }, + { 0x06BC, UC_JOINING_GROUP_NOON }, + { 0x06BD, UC_JOINING_GROUP_NYA }, + { 0x06BE, UC_JOINING_GROUP_KNOTTED_HEH }, + { 0x06BF, UC_JOINING_GROUP_HAH }, + { 0x06C0, UC_JOINING_GROUP_TEH_MARBUTA }, + { 0x06C1, UC_JOINING_GROUP_HEH_GOAL }, + { 0x06C2, UC_JOINING_GROUP_HEH_GOAL }, + { 0x06C3, UC_JOINING_GROUP_TEH_MARBUTA_GOAL }, + { 0x06C4, UC_JOINING_GROUP_WAW }, + { 0x06C5, UC_JOINING_GROUP_WAW }, + { 0x06C6, UC_JOINING_GROUP_WAW }, + { 0x06C7, UC_JOINING_GROUP_WAW }, + { 0x06C8, UC_JOINING_GROUP_WAW }, + { 0x06C9, UC_JOINING_GROUP_WAW }, + { 0x06CA, UC_JOINING_GROUP_WAW }, + { 0x06CB, UC_JOINING_GROUP_WAW }, + { 0x06CC, UC_JOINING_GROUP_FARSI_YEH }, + { 0x06CD, UC_JOINING_GROUP_YEH_WITH_TAIL }, + { 0x06CE, UC_JOINING_GROUP_FARSI_YEH }, + { 0x06CF, UC_JOINING_GROUP_WAW }, + { 0x06D0, UC_JOINING_GROUP_YEH }, + { 0x06D1, UC_JOINING_GROUP_YEH }, + { 0x06D2, UC_JOINING_GROUP_YEH_BARREE }, + { 0x06D3, UC_JOINING_GROUP_YEH_BARREE }, + { 0x06D5, UC_JOINING_GROUP_TEH_MARBUTA }, + { 0x06EE, UC_JOINING_GROUP_DAL }, + { 0x06EF, UC_JOINING_GROUP_REH }, + { 0x06FA, UC_JOINING_GROUP_SEEN }, + { 0x06FB, UC_JOINING_GROUP_SAD }, + { 0x06FC, UC_JOINING_GROUP_AIN }, + { 0x06FF, UC_JOINING_GROUP_KNOTTED_HEH }, + { 0x0710, UC_JOINING_GROUP_ALAPH }, + { 0x0712, UC_JOINING_GROUP_BETH }, + { 0x0713, UC_JOINING_GROUP_GAMAL }, + { 0x0714, UC_JOINING_GROUP_GAMAL }, + { 0x0715, UC_JOINING_GROUP_DALATH_RISH }, + { 0x0716, UC_JOINING_GROUP_DALATH_RISH }, + { 0x0717, UC_JOINING_GROUP_HE }, + { 0x0718, UC_JOINING_GROUP_SYRIAC_WAW }, + { 0x0719, UC_JOINING_GROUP_ZAIN }, + { 0x071A, UC_JOINING_GROUP_HETH }, + { 0x071B, UC_JOINING_GROUP_TETH }, + { 0x071C, UC_JOINING_GROUP_TETH }, + { 0x071D, UC_JOINING_GROUP_YUDH }, + { 0x071E, UC_JOINING_GROUP_YUDH_HE }, + { 0x071F, UC_JOINING_GROUP_KAPH }, + { 0x0720, UC_JOINING_GROUP_LAMADH }, + { 0x0721, UC_JOINING_GROUP_MIM }, + { 0x0722, UC_JOINING_GROUP_NUN }, + { 0x0723, UC_JOINING_GROUP_SEMKATH }, + { 0x0724, UC_JOINING_GROUP_FINAL_SEMKATH }, + { 0x0725, UC_JOINING_GROUP_E }, + { 0x0726, UC_JOINING_GROUP_PE }, + { 0x0727, UC_JOINING_GROUP_REVERSED_PE }, + { 0x0728, UC_JOINING_GROUP_SADHE }, + { 0x0729, UC_JOINING_GROUP_QAPH }, + { 0x072A, UC_JOINING_GROUP_DALATH_RISH }, + { 0x072B, UC_JOINING_GROUP_SHIN }, + { 0x072C, UC_JOINING_GROUP_TAW }, + { 0x072D, UC_JOINING_GROUP_BETH }, + { 0x072E, UC_JOINING_GROUP_GAMAL }, + { 0x072F, UC_JOINING_GROUP_DALATH_RISH }, + { 0x074D, UC_JOINING_GROUP_ZHAIN }, + { 0x074E, UC_JOINING_GROUP_KHAPH }, + { 0x074F, UC_JOINING_GROUP_FE }, + { 0x0750, UC_JOINING_GROUP_BEH }, + { 0x0751, UC_JOINING_GROUP_BEH }, + { 0x0752, UC_JOINING_GROUP_BEH }, + { 0x0753, UC_JOINING_GROUP_BEH }, + { 0x0754, UC_JOINING_GROUP_BEH }, + { 0x0755, UC_JOINING_GROUP_BEH }, + { 0x0756, UC_JOINING_GROUP_BEH }, + { 0x0757, UC_JOINING_GROUP_HAH }, + { 0x0758, UC_JOINING_GROUP_HAH }, + { 0x0759, UC_JOINING_GROUP_DAL }, + { 0x075A, UC_JOINING_GROUP_DAL }, + { 0x075B, UC_JOINING_GROUP_REH }, + { 0x075C, UC_JOINING_GROUP_SEEN }, + { 0x075D, UC_JOINING_GROUP_AIN }, + { 0x075E, UC_JOINING_GROUP_AIN }, + { 0x075F, UC_JOINING_GROUP_AIN }, + { 0x0760, UC_JOINING_GROUP_FEH }, + { 0x0761, UC_JOINING_GROUP_FEH }, + { 0x0762, UC_JOINING_GROUP_GAF }, + { 0x0763, UC_JOINING_GROUP_GAF }, + { 0x0764, UC_JOINING_GROUP_GAF }, + { 0x0765, UC_JOINING_GROUP_MEEM }, + { 0x0766, UC_JOINING_GROUP_MEEM }, + { 0x0767, UC_JOINING_GROUP_NOON }, + { 0x0768, UC_JOINING_GROUP_NOON }, + { 0x0769, UC_JOINING_GROUP_NOON }, + { 0x076A, UC_JOINING_GROUP_LAM }, + { 0x076B, UC_JOINING_GROUP_REH }, + { 0x076C, UC_JOINING_GROUP_REH }, + { 0x076D, UC_JOINING_GROUP_SEEN }, + { 0x076E, UC_JOINING_GROUP_HAH }, + { 0x076F, UC_JOINING_GROUP_HAH }, + { 0x0770, UC_JOINING_GROUP_SEEN }, + { 0x0771, UC_JOINING_GROUP_REH }, + { 0x0772, UC_JOINING_GROUP_HAH }, + { 0x0773, UC_JOINING_GROUP_ALEF }, + { 0x0774, UC_JOINING_GROUP_ALEF }, + { 0x0775, UC_JOINING_GROUP_FARSI_YEH }, + { 0x0776, UC_JOINING_GROUP_FARSI_YEH }, + { 0x0777, UC_JOINING_GROUP_YEH }, + { 0x0778, UC_JOINING_GROUP_WAW }, + { 0x0779, UC_JOINING_GROUP_WAW }, + { 0x077A, UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE }, + { 0x077B, UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE }, + { 0x077C, UC_JOINING_GROUP_HAH }, + { 0x077D, UC_JOINING_GROUP_SEEN }, + { 0x077E, UC_JOINING_GROUP_SEEN }, + { 0x077F, UC_JOINING_GROUP_KAF } |