Blame localedata/tests-mbwc/dat_wcsstr.c

Packit 6c4009
/*
Packit 6c4009
 *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
Packit 6c4009
 *
Packit 6c4009
 *	 FILE:	dat_wcsstr.c
Packit 6c4009
 *
Packit 6c4009
 *	 WCSSTR:  wchar_t *wcsstr (const wchar_t *ws1, const wchar_t *ws2);
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * NOTE:
Packit 6c4009
 *	 This is not a locale sensitive function.
Packit 6c4009
 *	 So those data in each locale doesn't make sense ...
Packit 6c4009
 *	 (redundant test cases)
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
Packit 6c4009
TST_WCSSTR tst_wcsstr_loc [] = {
Packit 6c4009
  {
Packit 6c4009
    { Twcsstr, TST_LOC_de },
Packit 6c4009
    {
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     { 0x00D1,0x0000		   }, },  /* #01 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     {	      0x00D2,0x0000	   }, },  /* #02 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     {		     0x00D3,0x0000 }, },  /* #03 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     { 0x00D1,0x00D2,0x0000	   }, },  /* #04 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     {	      0x00D2,0x00D3,0x0000 }, },  /* #05 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #06 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     { 0x00D2,0x00D3,0x00D4,0x0000 }, },  /* #07 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     { 0x00D0,0x00D1,0x00D2,0x0000 }, },  /* #08 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     { 0x0000			   }, },  /* #09 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     { 0x00D1,0x0000		   }, },  /* #10 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
Packit 6c4009
		     { 0x0000			   }, },  /* #11 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { .is_last = 1 }
Packit 6c4009
    }
Packit 6c4009
  },
Packit 6c4009
  {
Packit 6c4009
    { Twcsstr, TST_LOC_enUS },
Packit 6c4009
    {
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     { 0x0041,0x0000		   }, },  /* #01 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     {	      0x0042,0x0000	   }, },  /* #02 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     {		     0x0043,0x0000 }, },  /* #03 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     { 0x0041,0x0042,0x0000	   }, },  /* #04 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     {	      0x0042,0x0043,0x0000 }, },  /* #05 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     { 0x0041,0x0042,0x0043,0x0000 }, },  /* #06 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     { 0x0042,0x0043,0x0044,0x0000 }, },  /* #07 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     { 0x0040,0x0041,0x0042,0x0000 }, },  /* #08 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
Packit 6c4009
		     { 0x0000			   }, },  /* #09 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
Packit 6c4009
		     { 0x0041,0x0000		   }, },  /* #10 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
Packit 6c4009
		     { 0x0000			   }, },  /* #11 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { .is_last = 1 }
Packit 6c4009
    }
Packit 6c4009
  },
Packit 6c4009
  {
Packit 6c4009
    { Twcsstr, TST_LOC_eucJP },
Packit 6c4009
    {
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     { 0x3041,0x0000		   }, },  /* #01 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     {	      0x3042,0x0000	   }, },  /* #02 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     {		     0x3043,0x0000 }, },  /* #03 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     { 0x3041,0x3042,0x0000	   }, },  /* #04 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     {	      0x3042,0x3043,0x0000 }, },  /* #05 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     { 0x3041,0x3042,0x3043,0x0000 }, },  /* #06 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     { 0x3042,0x3043,0x3044,0x0000 }, },  /* #07 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     { 0x3040,0x3041,0x3042,0x0000 }, },  /* #08 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
Packit 6c4009
		     { 0x0000			   }, },  /* #09 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
Packit 6c4009
		     { 0x3041,0x0000		   }, },  /* #10 */
Packit 6c4009
	/*expect*/ { 0,1,(wchar_t *)NULL,	      },
Packit 6c4009
      },
Packit 6c4009
      { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
Packit 6c4009
		     { 0x0000			   }, },  /* #11 */
Packit 6c4009
	/*expect*/ { 0,0,0,			      },
Packit 6c4009
      },
Packit 6c4009
      { .is_last = 1 }
Packit 6c4009
    }
Packit 6c4009
  },
Packit 6c4009
  {
Packit 6c4009
    { Twcsstr, TST_LOC_end }
Packit 6c4009
  }
Packit 6c4009
};