root/maint/gnulib/tests/unictype/test-joininggroup_byname.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

   1 /* Test the Unicode character Arabic joining group functions.
   2    Copyright (C) 2011 Free Software Foundation, Inc.
   3    Written by Bruno Haible <bruno@clisp.org>, 2011.
   4 
   5    This program is free software: you can redistribute it and/or modify it
   6    under the terms of the GNU Lesser General Public License as published
   7    by the Free Software Foundation; either version 3 of the License, or
   8    (at your option) any later version.
   9 
  10    This program is distributed in the hope that it will be useful,
  11    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13    Lesser General Public License for more details.
  14 
  15    You should have received a copy of the GNU Lesser General Public License
  16    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
  17 
  18 #include <config.h>
  19 
  20 /* Specification.  */
  21 #include "unictype.h"
  22 
  23 #include <string.h>
  24 
  25 #include "macros.h"
  26 
  27 int
  28 main ()
     /* [previous][next][first][last][top][bottom][index][help] */
  29 {
  30   ASSERT (uc_joining_group_byname ("NO JOINING GROUP") == UC_JOINING_GROUP_NONE);
  31   ASSERT (uc_joining_group_byname ("No Joining Group") == UC_JOINING_GROUP_NONE);
  32   ASSERT (uc_joining_group_byname ("No_Joining_Group") == UC_JOINING_GROUP_NONE);
  33   ASSERT (uc_joining_group_byname ("NoJoiningGroup") == UC_JOINING_GROUP_NONE);
  34   ASSERT (uc_joining_group_byname ("AIN") == UC_JOINING_GROUP_AIN);
  35   ASSERT (uc_joining_group_byname ("Ain") == UC_JOINING_GROUP_AIN);
  36   ASSERT (uc_joining_group_byname ("ALAPH") == UC_JOINING_GROUP_ALAPH);
  37   ASSERT (uc_joining_group_byname ("Alaph") == UC_JOINING_GROUP_ALAPH);
  38   ASSERT (uc_joining_group_byname ("ALEF") == UC_JOINING_GROUP_ALEF);
  39   ASSERT (uc_joining_group_byname ("Alef") == UC_JOINING_GROUP_ALEF);
  40   ASSERT (uc_joining_group_byname ("BEH") == UC_JOINING_GROUP_BEH);
  41   ASSERT (uc_joining_group_byname ("Beh") == UC_JOINING_GROUP_BEH);
  42   ASSERT (uc_joining_group_byname ("BETH") == UC_JOINING_GROUP_BETH);
  43   ASSERT (uc_joining_group_byname ("Beth") == UC_JOINING_GROUP_BETH);
  44   ASSERT (uc_joining_group_byname ("BURUSHASKI YEH BARREE") == UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE);
  45   ASSERT (uc_joining_group_byname ("Burushaski Yeh Barree") == UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE);
  46   ASSERT (uc_joining_group_byname ("Burushaski_Yeh_Barree") == UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE);
  47   ASSERT (uc_joining_group_byname ("BurushaskiYehBarree") == UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE);
  48   ASSERT (uc_joining_group_byname ("DAL") == UC_JOINING_GROUP_DAL);
  49   ASSERT (uc_joining_group_byname ("Dal") == UC_JOINING_GROUP_DAL);
  50   ASSERT (uc_joining_group_byname ("DALATH RISH") == UC_JOINING_GROUP_DALATH_RISH);
  51   ASSERT (uc_joining_group_byname ("Dalath Rish") == UC_JOINING_GROUP_DALATH_RISH);
  52   ASSERT (uc_joining_group_byname ("Dalath_Rish") == UC_JOINING_GROUP_DALATH_RISH);
  53   ASSERT (uc_joining_group_byname ("DalathRish") == UC_JOINING_GROUP_DALATH_RISH);
  54   ASSERT (uc_joining_group_byname ("E") == UC_JOINING_GROUP_E);
  55   ASSERT (uc_joining_group_byname ("FARSI YEH") == UC_JOINING_GROUP_FARSI_YEH);
  56   ASSERT (uc_joining_group_byname ("Farsi Yeh") == UC_JOINING_GROUP_FARSI_YEH);
  57   ASSERT (uc_joining_group_byname ("Farsi_Yeh") == UC_JOINING_GROUP_FARSI_YEH);
  58   ASSERT (uc_joining_group_byname ("FarsiYeh") == UC_JOINING_GROUP_FARSI_YEH);
  59   ASSERT (uc_joining_group_byname ("FE") == UC_JOINING_GROUP_FE);
  60   ASSERT (uc_joining_group_byname ("Fe") == UC_JOINING_GROUP_FE);
  61   ASSERT (uc_joining_group_byname ("FEH") == UC_JOINING_GROUP_FEH);
  62   ASSERT (uc_joining_group_byname ("Feh") == UC_JOINING_GROUP_FEH);
  63   ASSERT (uc_joining_group_byname ("FINAL SEMKATH") == UC_JOINING_GROUP_FINAL_SEMKATH);
  64   ASSERT (uc_joining_group_byname ("Final Semkath") == UC_JOINING_GROUP_FINAL_SEMKATH);
  65   ASSERT (uc_joining_group_byname ("Final_Semkath") == UC_JOINING_GROUP_FINAL_SEMKATH);
  66   ASSERT (uc_joining_group_byname ("FinalSemkath") == UC_JOINING_GROUP_FINAL_SEMKATH);
  67   ASSERT (uc_joining_group_byname ("GAF") == UC_JOINING_GROUP_GAF);
  68   ASSERT (uc_joining_group_byname ("Gaf") == UC_JOINING_GROUP_GAF);
  69   ASSERT (uc_joining_group_byname ("GAMAL") == UC_JOINING_GROUP_GAMAL);
  70   ASSERT (uc_joining_group_byname ("Gamal") == UC_JOINING_GROUP_GAMAL);
  71   ASSERT (uc_joining_group_byname ("HAH") == UC_JOINING_GROUP_HAH);
  72   ASSERT (uc_joining_group_byname ("Hah") == UC_JOINING_GROUP_HAH);
  73   ASSERT (uc_joining_group_byname ("HE") == UC_JOINING_GROUP_HE);
  74   ASSERT (uc_joining_group_byname ("He") == UC_JOINING_GROUP_HE);
  75   ASSERT (uc_joining_group_byname ("HEH") == UC_JOINING_GROUP_HEH);
  76   ASSERT (uc_joining_group_byname ("Heh") == UC_JOINING_GROUP_HEH);
  77   ASSERT (uc_joining_group_byname ("HEH GOAL") == UC_JOINING_GROUP_HEH_GOAL);
  78   ASSERT (uc_joining_group_byname ("Heh Goal") == UC_JOINING_GROUP_HEH_GOAL);
  79   ASSERT (uc_joining_group_byname ("Heh_Goal") == UC_JOINING_GROUP_HEH_GOAL);
  80   ASSERT (uc_joining_group_byname ("HehGoal") == UC_JOINING_GROUP_HEH_GOAL);
  81   ASSERT (uc_joining_group_byname ("HETH") == UC_JOINING_GROUP_HETH);
  82   ASSERT (uc_joining_group_byname ("Heth") == UC_JOINING_GROUP_HETH);
  83   ASSERT (uc_joining_group_byname ("KAF") == UC_JOINING_GROUP_KAF);
  84   ASSERT (uc_joining_group_byname ("Kaf") == UC_JOINING_GROUP_KAF);
  85   ASSERT (uc_joining_group_byname ("KAPH") == UC_JOINING_GROUP_KAPH);
  86   ASSERT (uc_joining_group_byname ("Kaph") == UC_JOINING_GROUP_KAPH);
  87   ASSERT (uc_joining_group_byname ("KHAPH") == UC_JOINING_GROUP_KHAPH);
  88   ASSERT (uc_joining_group_byname ("Khaph") == UC_JOINING_GROUP_KHAPH);
  89   ASSERT (uc_joining_group_byname ("KNOTTED HEH") == UC_JOINING_GROUP_KNOTTED_HEH);
  90   ASSERT (uc_joining_group_byname ("Knotted Heh") == UC_JOINING_GROUP_KNOTTED_HEH);
  91   ASSERT (uc_joining_group_byname ("Knotted_Heh") == UC_JOINING_GROUP_KNOTTED_HEH);
  92   ASSERT (uc_joining_group_byname ("KnottedHeh") == UC_JOINING_GROUP_KNOTTED_HEH);
  93   ASSERT (uc_joining_group_byname ("LAM") == UC_JOINING_GROUP_LAM);
  94   ASSERT (uc_joining_group_byname ("Lam") == UC_JOINING_GROUP_LAM);
  95   ASSERT (uc_joining_group_byname ("LAMADH") == UC_JOINING_GROUP_LAMADH);
  96   ASSERT (uc_joining_group_byname ("Lamadh") == UC_JOINING_GROUP_LAMADH);
  97   ASSERT (uc_joining_group_byname ("MEEM") == UC_JOINING_GROUP_MEEM);
  98   ASSERT (uc_joining_group_byname ("Meem") == UC_JOINING_GROUP_MEEM);
  99   ASSERT (uc_joining_group_byname ("MIM") == UC_JOINING_GROUP_MIM);
 100   ASSERT (uc_joining_group_byname ("Mim") == UC_JOINING_GROUP_MIM);
 101   ASSERT (uc_joining_group_byname ("NOON") == UC_JOINING_GROUP_NOON);
 102   ASSERT (uc_joining_group_byname ("Noon") == UC_JOINING_GROUP_NOON);
 103   ASSERT (uc_joining_group_byname ("NUN") == UC_JOINING_GROUP_NUN);
 104   ASSERT (uc_joining_group_byname ("Nun") == UC_JOINING_GROUP_NUN);
 105   ASSERT (uc_joining_group_byname ("NYA") == UC_JOINING_GROUP_NYA);
 106   ASSERT (uc_joining_group_byname ("Nya") == UC_JOINING_GROUP_NYA);
 107   ASSERT (uc_joining_group_byname ("PE") == UC_JOINING_GROUP_PE);
 108   ASSERT (uc_joining_group_byname ("Pe") == UC_JOINING_GROUP_PE);
 109   ASSERT (uc_joining_group_byname ("QAF") == UC_JOINING_GROUP_QAF);
 110   ASSERT (uc_joining_group_byname ("Qaf") == UC_JOINING_GROUP_QAF);
 111   ASSERT (uc_joining_group_byname ("QAPH") == UC_JOINING_GROUP_QAPH);
 112   ASSERT (uc_joining_group_byname ("Qaph") == UC_JOINING_GROUP_QAPH);
 113   ASSERT (uc_joining_group_byname ("REH") == UC_JOINING_GROUP_REH);
 114   ASSERT (uc_joining_group_byname ("Reh") == UC_JOINING_GROUP_REH);
 115   ASSERT (uc_joining_group_byname ("REVERSED PE") == UC_JOINING_GROUP_REVERSED_PE);
 116   ASSERT (uc_joining_group_byname ("Reversed Pe") == UC_JOINING_GROUP_REVERSED_PE);
 117   ASSERT (uc_joining_group_byname ("Reversed_Pe") == UC_JOINING_GROUP_REVERSED_PE);
 118   ASSERT (uc_joining_group_byname ("ReversedPe") == UC_JOINING_GROUP_REVERSED_PE);
 119   ASSERT (uc_joining_group_byname ("SAD") == UC_JOINING_GROUP_SAD);
 120   ASSERT (uc_joining_group_byname ("Sad") == UC_JOINING_GROUP_SAD);
 121   ASSERT (uc_joining_group_byname ("SADHE") == UC_JOINING_GROUP_SADHE);
 122   ASSERT (uc_joining_group_byname ("Sadhe") == UC_JOINING_GROUP_SADHE);
 123   ASSERT (uc_joining_group_byname ("SEEN") == UC_JOINING_GROUP_SEEN);
 124   ASSERT (uc_joining_group_byname ("Seen") == UC_JOINING_GROUP_SEEN);
 125   ASSERT (uc_joining_group_byname ("SEMKATH") == UC_JOINING_GROUP_SEMKATH);
 126   ASSERT (uc_joining_group_byname ("Semkath") == UC_JOINING_GROUP_SEMKATH);
 127   ASSERT (uc_joining_group_byname ("SHIN") == UC_JOINING_GROUP_SHIN);
 128   ASSERT (uc_joining_group_byname ("Shin") == UC_JOINING_GROUP_SHIN);
 129   ASSERT (uc_joining_group_byname ("SWASH KAF") == UC_JOINING_GROUP_SWASH_KAF);
 130   ASSERT (uc_joining_group_byname ("Swash Kaf") == UC_JOINING_GROUP_SWASH_KAF);
 131   ASSERT (uc_joining_group_byname ("Swash_Kaf") == UC_JOINING_GROUP_SWASH_KAF);
 132   ASSERT (uc_joining_group_byname ("SwashKaf") == UC_JOINING_GROUP_SWASH_KAF);
 133   ASSERT (uc_joining_group_byname ("SYRIAC WAW") == UC_JOINING_GROUP_SYRIAC_WAW);
 134   ASSERT (uc_joining_group_byname ("Syriac Waw") == UC_JOINING_GROUP_SYRIAC_WAW);
 135   ASSERT (uc_joining_group_byname ("Syriac_Waw") == UC_JOINING_GROUP_SYRIAC_WAW);
 136   ASSERT (uc_joining_group_byname ("SyriacWaw") == UC_JOINING_GROUP_SYRIAC_WAW);
 137   ASSERT (uc_joining_group_byname ("TAH") == UC_JOINING_GROUP_TAH);
 138   ASSERT (uc_joining_group_byname ("Tah") == UC_JOINING_GROUP_TAH);
 139   ASSERT (uc_joining_group_byname ("TAW") == UC_JOINING_GROUP_TAW);
 140   ASSERT (uc_joining_group_byname ("Taw") == UC_JOINING_GROUP_TAW);
 141   ASSERT (uc_joining_group_byname ("TEH MARBUTA") == UC_JOINING_GROUP_TEH_MARBUTA);
 142   ASSERT (uc_joining_group_byname ("Teh Marbuta") == UC_JOINING_GROUP_TEH_MARBUTA);
 143   ASSERT (uc_joining_group_byname ("Teh_Marbuta") == UC_JOINING_GROUP_TEH_MARBUTA);
 144   ASSERT (uc_joining_group_byname ("TehMarbuta") == UC_JOINING_GROUP_TEH_MARBUTA);
 145   ASSERT (uc_joining_group_byname ("TEH MARBUTA GOAL") == UC_JOINING_GROUP_TEH_MARBUTA_GOAL);
 146   ASSERT (uc_joining_group_byname ("Teh Marbuta Goal") == UC_JOINING_GROUP_TEH_MARBUTA_GOAL);
 147   ASSERT (uc_joining_group_byname ("Teh_Marbuta_Goal") == UC_JOINING_GROUP_TEH_MARBUTA_GOAL);
 148   ASSERT (uc_joining_group_byname ("TehMarbutaGoal") == UC_JOINING_GROUP_TEH_MARBUTA_GOAL);
 149   ASSERT (uc_joining_group_byname ("TETH") == UC_JOINING_GROUP_TETH);
 150   ASSERT (uc_joining_group_byname ("Teth") == UC_JOINING_GROUP_TETH);
 151   ASSERT (uc_joining_group_byname ("WAW") == UC_JOINING_GROUP_WAW);
 152   ASSERT (uc_joining_group_byname ("Waw") == UC_JOINING_GROUP_WAW);
 153   ASSERT (uc_joining_group_byname ("YEH") == UC_JOINING_GROUP_YEH);
 154   ASSERT (uc_joining_group_byname ("Yeh") == UC_JOINING_GROUP_YEH);
 155   ASSERT (uc_joining_group_byname ("YEH BARREE") == UC_JOINING_GROUP_YEH_BARREE);
 156   ASSERT (uc_joining_group_byname ("Yeh Barree") == UC_JOINING_GROUP_YEH_BARREE);
 157   ASSERT (uc_joining_group_byname ("Yeh_Barree") == UC_JOINING_GROUP_YEH_BARREE);
 158   ASSERT (uc_joining_group_byname ("YehBarree") == UC_JOINING_GROUP_YEH_BARREE);
 159   ASSERT (uc_joining_group_byname ("YEH WITH TAIL") == UC_JOINING_GROUP_YEH_WITH_TAIL);
 160   ASSERT (uc_joining_group_byname ("Yeh with tail") == UC_JOINING_GROUP_YEH_WITH_TAIL);
 161   ASSERT (uc_joining_group_byname ("Yeh_with_tail") == UC_JOINING_GROUP_YEH_WITH_TAIL);
 162   ASSERT (uc_joining_group_byname ("YehWithTail") == UC_JOINING_GROUP_YEH_WITH_TAIL);
 163   ASSERT (uc_joining_group_byname ("YUDH") == UC_JOINING_GROUP_YUDH);
 164   ASSERT (uc_joining_group_byname ("Yudh") == UC_JOINING_GROUP_YUDH);
 165   ASSERT (uc_joining_group_byname ("YUDH HE") == UC_JOINING_GROUP_YUDH_HE);
 166   ASSERT (uc_joining_group_byname ("Yudh He") == UC_JOINING_GROUP_YUDH_HE);
 167   ASSERT (uc_joining_group_byname ("Yudh_He") == UC_JOINING_GROUP_YUDH_HE);
 168   ASSERT (uc_joining_group_byname ("YudhHe") == UC_JOINING_GROUP_YUDH_HE);
 169   ASSERT (uc_joining_group_byname ("ZAIN") == UC_JOINING_GROUP_ZAIN);
 170   ASSERT (uc_joining_group_byname ("Zain") == UC_JOINING_GROUP_ZAIN);
 171   ASSERT (uc_joining_group_byname ("ZHAIN") == UC_JOINING_GROUP_ZHAIN);
 172   ASSERT (uc_joining_group_byname ("Zhain") == UC_JOINING_GROUP_ZHAIN);
 173   ASSERT (uc_joining_group_byname ("SEEN WITH 3 DOTS BELOW AND 3 DOTS ABOVE") < 0);
 174   ASSERT (uc_joining_group_byname ("X") < 0);
 175   ASSERT (uc_joining_group_byname ("") < 0);
 176 
 177   return 0;
 178 }

/* [previous][next][first][last][top][bottom][index][help] */