Update.
authorAndreas Jaeger <aj@suse.de>
Wed, 28 Jun 2000 13:05:23 +0000 (13:05 +0000)
committerAndreas Jaeger <aj@suse.de>
Wed, 28 Jun 2000 13:05:23 +0000 (13:05 +0000)
* Makefile (locale_test_suite): Add tst_mbrlen.
(tst_mbrlen-ENV): New.

* tests-mbwc/tst_mbrlen.c: New file

* tests-mbwc/dat_mbrlen.c: New file.

* tests-mbwc/tst_types.h (struct TIN_MBSTOWCS_REC): Use const
char*.
(struct TST_HEAD): Use const char* instead of an array.

* tests-mbwc/tst_wcsstr.c (tst_wcsstr): ws2 has size WCSSIZE.

* tests-mbwc/dat_iswalnum.c (TST_ISW_LOC): Add tests for de_UTF8.

* tests-mbwc/tgn_locdef.h (TST_LOC_de_UTF8): Added.

localedata/ChangeLog
localedata/Makefile
localedata/tests-mbwc/dat_iswalnum.c
localedata/tests-mbwc/tst_types.h
localedata/tests-mbwc/tst_wcsstr.c

index 8725fce..247733c 100644 (file)
@@ -1,5 +1,22 @@
 2000-06-28  Andreas Jaeger  <aj@suse.de>
 
+       * Makefile (locale_test_suite): Add tst_mbrlen.
+       (tst_mbrlen-ENV): New.
+
+       * tests-mbwc/tst_mbrlen.c: New file
+
+       * tests-mbwc/dat_mbrlen.c: New file.
+
+       * tests-mbwc/tst_types.h (struct TIN_MBSTOWCS_REC): Use const
+       char*.
+       (struct TST_HEAD): Use const char* instead of an array.
+
+       * tests-mbwc/tst_wcsstr.c (tst_wcsstr): ws2 has size WCSSIZE.
+
+       * tests-mbwc/dat_iswalnum.c (TST_ISW_LOC): Add tests for de_UTF8.
+
+       * tests-mbwc/tgn_locdef.h (TST_LOC_de_UTF8): Added.
+
        * tests-mbwc/tgn_locdef.h (TST_LOC_de_UTF8): Added.
 
 2000-06-27  Ulrich Drepper  <drepper@redhat.com>
index 7c88b04..7ea9938 100644 (file)
@@ -85,7 +85,7 @@ locale_test_suite := tst_iswalnum tst_iswprint tst_towctrans tst_wcsncmp \
                     tst_wcscspn tst_wcswidth tst_iswlower tst_swscanf   \
                     tst_wcslen tst_wctob tst_iswctype tst_towlower      \
                     tst_wcscat tst_towupper tst_wcscmp tst_wcsncat      \
-                    tst_wcsncpy tst_wcsxfrm tst_wcwidth
+                    tst_wcsncpy tst_wcsxfrm tst_wcwidth tst_mbrlen
 tests = $(locale_test_suite)
 endif
 endif
@@ -161,6 +161,7 @@ tst_iswpunct-ENV = $(TEST_MBWC_ENV)
 tst_iswspace-ENV = $(TEST_MBWC_ENV)
 tst_iswupper-ENV = $(TEST_MBWC_ENV)
 tst_iswxdigit-ENV = $(TEST_MBWC_ENV)
+tst_mbrlen-ENV = $(TEST_MBWC_ENV)
 tst_swscanf-ENV = $(TEST_MBWC_ENV)
 tst_towctrans-ENV = $(TEST_MBWC_ENV)
 tst_towlower-ENV = $(TEST_MBWC_ENV)
index f3bcd33..440e451 100644 (file)
@@ -43,6 +43,37 @@ TST_ISW_LOC (ALNUM, alnum) = {
          {  is_last: 1 }                 /* last element    */
        }
     },
+    {  TST_ISW_REC (de_UTF8, alnum)
+       {
+         {  { 0xC280 }, { 0,0,1,0 }  },  /* CTRL     */
+         {  { 0xC29F }, { 0,0,1,0 }  },  /* CTRL     */
+         {  { 0xC2A0 }, { 0,0,1,0 }  },  /* NB SPACE */
+         {  { 0xC2A1 }, { 0,0,1,0 }  },  /* UD !     */
+         {  { 0xC2B0 }, { 0,0,1,0 }  },  /* Degree   */
+         {  { 0xC2B1 }, { 0,0,1,0 }  },  /* +- sign  */
+         {  { 0xC2B2 }, { 0,0,1,0 }  },  /* SUP 2    */
+         {  { 0xC2B3 }, { 0,0,1,0 }  },  /* SUP 3    */
+         {  { 0xC2B4 }, { 0,0,1,0 }  },  /* ACUTE    */
+         {  { 0xC2B8 }, { 0,0,1,0 }  },  /* CEDILLA  */
+         {  { 0xC2B9 }, { 0,0,1,0 }  },  /* SUP 1    */
+         {  { 0xC2BB }, { 0,0,1,0 }  },  /* >>       */
+         {  { 0xC2BC }, { 0,0,1,0 }  },  /* 1/4      */
+         {  { 0xC2BD }, { 0,0,1,0 }  },  /* 1/2      */
+         {  { 0xC2BE }, { 0,0,1,0 }  },  /* 3/4      */
+         {  { 0xC2BF }, { 0,0,1,0 }  },  /* UD ?     */
+         {  { 0xC380 }, { 0,0,0,0 }  },  /* A Grave  */
+         {  { 0xC396 }, { 0,0,0,0 }  },  /* O dia    */
+         {  { 0xC397 }, { 0,0,1,0 }  },  /* multipl. */
+         {  { 0xC398 }, { 0,0,0,0 }  },  /* O stroke */
+         {  { 0xC39F }, { 0,0,0,0 }  },  /* small Sh */
+         {  { 0xC3A0 }, { 0,0,0,0 }  },  /* a grave  */
+         {  { 0xC3B6 }, { 0,0,0,0 }  },  /* o dia    */
+         {  { 0xC3B7 }, { 0,0,1,0 }  },  /* division */
+         {  { 0xC3B8 }, { 0,0,0,0 }  },  /* o stroke */
+         {  { 0xC3BF }, { 0,0,0,0 }  },  /* y dia    */
+         {  is_last: 1 }                 /* last element    */
+       }
+    },
     {  TST_ISW_REC (enUS, alnum)
        {
          {  { WEOF   }, { 0,0,1,0 }  },
index e0a8e7f..ba6098d 100644 (file)
@@ -16,7 +16,6 @@
 #include "tst_funcs.h"
 #include "tgn_funcdef.h"
 
-#define NAMESIZE          64
 #define MBSSIZE                   24
 #define WCSSIZE                   12
 #define MONFMTSIZE        16
@@ -53,7 +52,7 @@ TST_FID;
 typedef struct
 {
   int func_id;
-  const char locale[NAMESIZE];
+  const char *locale;
 }
 TST_HEAD;
 
@@ -208,7 +207,7 @@ typedef struct
   {
     char w_flg;
     char s_flg;
-    char s[MBSSIZE];
+    const char *s;
     size_t n;
   }
   seq[MBSTOWCS_SEQNUM];
index 15654df..20ebecf 100644 (file)
@@ -54,7 +54,7 @@ tst_wcsstr (FILE * fp, int debug_flg)
            continue;
          }
 
-       for (i = 0, err = 0; *(ws2 + i) != 0 && i < MBSSIZE; i++)
+       for (i = 0, err = 0; *(ws2 + i) != 0 && i < WCSSIZE; i++)
          {
            if (debug_flg)
              {