Skip to content

Commit

Permalink
Update tst_mbrlen/tst_mbrtowc for mblen change
Browse files Browse the repository at this point in the history
commit 9781a37 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.
  • Loading branch information
Stefan Liebler authored and H.J. Lu committed Apr 10, 2015
1 parent 5556d30 commit 7378b1f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions localedata/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions localedata/tests-mbwc/dat_mbrlen.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
},
{
{
{ 0, 1, 0, },
{ 0, 1, -2, },
{ 0, 1, 0, },
{ 0, 1, 1, },
}
Expand All @@ -46,7 +46,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
},
{
{
{ 0, 1, 0, },
{ 0, 1, -2, },
{ 0, 1, 1, },
{ 0, 1, 1, },
}
Expand All @@ -68,7 +68,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
},
{
{
{ 0, 1, 0, },
{ 0, 1, -2, },
{ 0, 1, 1, },
{ 0, 1, 1, },
}
Expand All @@ -84,7 +84,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
},
{
{
{ 0, 1, 0, },
{ 0, 1, -2, },
{ EILSEQ, 1, -1, },
{ EILSEQ, 1, -1, },
}
Expand Down Expand Up @@ -140,7 +140,7 @@ TST_MBRLEN tst_mbrlen_loc [] = {
},
{
{
{ 0, 1, 0, },
{ 0, 1, -2, },
{ 0, 1, -2, },
{ EILSEQ, 1, -1, },
}
Expand Down
2 changes: 1 addition & 1 deletion localedata/tests-mbwc/tst_mbrtowc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7378b1f

Please sign in to comment.