dat_wcstok.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
  3. *
  4. * FILE: dat_wcstok.c
  5. *
  6. * WCSTOK: wchar_t *wcstok (wchar_t *ws, const wchar_t *dlm,
  7. * wchar_t **pt);
  8. */
  9. /*
  10. * NOTE:
  11. * need more test data!
  12. * locale insensitive function...
  13. */
  14. TST_WCSTOK tst_wcstok_loc [] = {
  15. {
  16. { Twcstok, TST_LOC_de },
  17. {
  18. {
  19. {
  20. {
  21. { 1, { 0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,
  22. 0x00D9,0x0000 },
  23. { 0x00D3,0x00D2, 0x00D5 }
  24. },
  25. { 0, { 0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,
  26. 0x00D9,0x0000 },
  27. { 0x00D3,0x00D2, 0x00D5 }
  28. },
  29. { 0, { 0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,0x00D8,
  30. 0x00D9,0x0000 },
  31. { 0x00D3,0x00D2, 0x00D5 }
  32. },
  33. }
  34. },
  35. {
  36. {
  37. { 0, 0,0,
  38. { 0x00D1,0x0000 }
  39. },
  40. { 0, 0,0,
  41. { 0x00D4,0x0000 }
  42. },
  43. { 0, 0,0,
  44. { 0x00D6,0x00D7,0x00D8,0x00D9,0x0000 }
  45. },
  46. }
  47. }
  48. },
  49. { .is_last = 1 }
  50. }
  51. },
  52. {
  53. { Twcstok, TST_LOC_enUS },
  54. {
  55. {
  56. {
  57. {
  58. { 1, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
  59. 0x0049,0x0000 },
  60. { 0x0043,0x0042, 0x0045 }
  61. },
  62. { 0, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
  63. 0x0049,0x0000 },
  64. { 0x0043,0x0042, 0x0045 }
  65. },
  66. { 0, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
  67. 0x0049,0x0000 },
  68. { 0x0043,0x0042, 0x0045 }
  69. },
  70. }
  71. },
  72. {
  73. {
  74. { 0, 0,0,
  75. { 0x0041,0x0000 }
  76. },
  77. { 0, 0,0,
  78. { 0x0044,0x0000 }
  79. },
  80. { 0, 0,0,
  81. { 0x0046,0x0047,0x0048,0x0049,0x0000 }
  82. },
  83. }
  84. }
  85. },
  86. { .is_last = 1 }
  87. }
  88. },
  89. {
  90. #if 0
  91. { Twcstok, TST_LOC_eucJP },
  92. #else
  93. { Twcstok, TST_LOC_ja_UTF8 },
  94. #endif
  95. {
  96. {
  97. {
  98. {
  99. { 1, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
  100. 0x0049,0x0000 },
  101. { 0x0043,0x0042, 0x0045 }
  102. },
  103. { 0, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
  104. 0x0049,0x0000 },
  105. { 0x0043,0x0042, 0x0045 }
  106. },
  107. { 0, { 0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,
  108. 0x0049,0x0000 },
  109. { 0x0043,0x0042, 0x0045 }
  110. },
  111. }
  112. },
  113. {
  114. {
  115. { 0, 0,0,
  116. { 0x0041,0x0000 }
  117. },
  118. { 0, 0,0,
  119. { 0x0044,0x0000 }
  120. },
  121. { 0, 0,0,
  122. { 0x0046,0x0047,0x0048,0x0049,0x0000 }
  123. },
  124. }
  125. }
  126. },
  127. { .is_last = 1 }
  128. }
  129. },
  130. {
  131. { Twcstok, TST_LOC_end }
  132. }
  133. };