]> sourceware.org Git - glibc.git/commitdiff
Update tst_mbrlen/tst_mbrtowc for mblen change
authorStefan Liebler <stli@linux.vnet.ibm.com>
Fri, 10 Apr 2015 22:42:00 +0000 (15:42 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 10 Apr 2015 22:45:53 +0000 (15:45 -0700)
commit 9781a370023952383028e07399fd196a889bb2be changed the expected
results for mbrlen in case of passing n=0 to -2. The initialization of
tst_mbrlen_loc and tst_mbrtowc should be updated accordingly.

* tests-mbwc/dat_mbrlen.c (tst_mbrlen_loc): Change expected
result to -2 in case of n == 0.
* tests-mbwc/tst_mbrtowc.c (tst_mbrtowc): Check result against
-2 instead of 0.

localedata/ChangeLog
localedata/tests-mbwc/dat_mbrlen.c
localedata/tests-mbwc/tst_mbrtowc.c

index 61857f57a2b1bdceb02d020b7b00aad03714ec8a..97e0329c83db088461b5b6d1600e709b4ab19fb7 100644 (file)
@@ -1,3 +1,10 @@
+2015-04-10  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+       * tests-mbwc/dat_mbrlen.c (tst_mbrlen_loc): Change expected
+       result to -2 in case of n == 0.
+       * tests-mbwc/tst_mbrtowc.c (tst_mbrtowc): Check result against
+       -2 instead of 0.
+
 2015-03-04  Roland McGrath  <roland@hack.frob.com>
 
        * bug-setlocale1.c (do_test): Remove argument handling and
index 61e84231158a245d173b21d3425e4f7992ef4012..1df485e9c9075794ced8167b8c6800b79ff003b8 100644 (file)
@@ -30,7 +30,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
        },
        {
          {
-           { 0,                1,  0,               },
+           { 0,                1,  -2,              },
            { 0,                1,  0,               },
            { 0,                1,  1,               },
          }
@@ -46,7 +46,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
        },
        {
          {
-           { 0,                1,  0,               },
+           { 0,                1,  -2,              },
            { 0,                1,  1,               },
            { 0,                1,  1,               },
          }
@@ -68,7 +68,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
        },
        {
          {
-           { 0,                1,  0,               },
+           { 0,                1,  -2,              },
            { 0,                1,  1,               },
            { 0,                1,  1,               },
          }
@@ -84,7 +84,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
        },
        {
          {
-           { 0,                1,  0,               },
+           { 0,                1,  -2,              },
            { EILSEQ,   1, -1,               },
            { EILSEQ,   1, -1,               },
          }
@@ -140,7 +140,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
        },
        {
          {
-           { 0,                1,  0,               },
+           { 0,                1,  -2,              },
            { 0,                1, -2,               },
            { EILSEQ,   1, -1,               },
          }
index ffb33ce11e1d72b76db45939139f38c151b95613..20507abd99e91bab89122a2aaba64d0a0b36a3f7 100644 (file)
@@ -26,7 +26,7 @@ tst_mbrtowc (FILE * fp, int debug_flg)
     TST_HEAD_LOCALE (mbrtowc, S_MBRTOWC);
     TST_DO_REC (mbrtowc)
     {
-      if (mbrtowc (NULL, "", 0, &t) != 0)
+      if (mbrtowc (NULL, "", 0, &t) != -2)
        {
          err_count++;
          Result (C_FAILURE, S_MBRTOWC, CASE_3,
This page took 0.048375 seconds and 5 git commands to generate.