dat_wcscat.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
  3. *
  4. * FILE: dat_wcscat.c
  5. *
  6. * WCSCAT: wchar_t *wcscat (wchar_t *ws1, wchar_t *ws2)
  7. */
  8. /* NOTE:
  9. Since this is not a locale sensitive function,
  10. it doesn't make sense to test the function on some
  11. locales. Better make different test cases for each locale ...
  12. (Also some wc* functions are not locale sensitive.)
  13. */
  14. TST_WCSCAT tst_wcscat_loc [] = {
  15. {
  16. {Twcscat, TST_LOC_de},
  17. {
  18. /* 1 */
  19. {{{ 0x00C1,0x00C2,0x0000 },
  20. { 0x00C3,0x00C4,0x0000 }, },
  21. { 0, 0, 0,
  22. { 0x00C1,0x00C2,0x00C3,0x00C4,0x0000 } },
  23. },
  24. /* 2 */
  25. {{{ 0x0001,0x0002,0x0000 },
  26. { 0x0003,0x0004,0x0000 }, },
  27. { 0, 0, 0,
  28. { 0x0001,0x0002,0x0003,0x0004,0x0000 } },
  29. },
  30. /* 3 */
  31. {{{ 0x0000 },
  32. { 0x00C3,0x00C4,0x0000 }, },
  33. { 0, 0, 0,
  34. { 0x00C3,0x00C4,0x0000 } },
  35. },
  36. /* 4 */
  37. {{{ 0x0001,0xFFFF,0x0000 },
  38. { 0x0080,0x0090,0x0000 }, },
  39. { 0, 0, 0,
  40. { 0x0001,0xFFFF,0x0080,0x0090,0x0000 } },
  41. },
  42. {.is_last = 1}
  43. }
  44. },
  45. {
  46. {Twcscat, TST_LOC_enUS},
  47. {
  48. /* 1 */
  49. {{{ 0x0041,0x0042,0x0000 },
  50. { 0x0043,0x0044,0x0000 }, },
  51. { 0, 0, 0,
  52. { 0x0041,0x0042,0x0043,0x0044,0x0000 } },
  53. },
  54. /* 2 */
  55. {{{ 0x0001,0x0002,0x0000 },
  56. { 0x0003,0x0004,0x0000 }, },
  57. { 0, 0, 0,
  58. { 0x0001,0x0002,0x0003,0x0004,0x0000 } },
  59. },
  60. /* 3 */
  61. {{{ 0x0000 },
  62. { 0x0043,0x0044,0x0000 }, },
  63. { 0, 0, 0,
  64. { 0x0043,0x0044,0x0000 } },
  65. },
  66. /* 4 */
  67. {{{ 0x0001,0xFFFF,0x0000 },
  68. { 0x0080,0x0090,0x0000 }, },
  69. { 0, 0, 0,
  70. { 0x0001,0xFFFF,0x0080,0x0090,0x0000 } },
  71. },
  72. {.is_last = 1}
  73. }
  74. },
  75. {
  76. #if 0
  77. {Twcscat, TST_LOC_eucJP},
  78. #else
  79. {Twcscat, TST_LOC_ja_UTF8},
  80. #endif
  81. {
  82. /* 1 */
  83. {{{ 0x30A2,0x74E0,0x0000 },
  84. { 0xFF71,0x0041,0x0000 }, },
  85. { 0, 0, 0,
  86. { 0x30A2,0x74E0,0xFF71,0x0041,0x0000 } },
  87. },
  88. /* 2 */
  89. {{{ 0x0001,0x0002,0x0000 },
  90. { 0x0003,0x0004,0x0000 }, },
  91. { 0, 0, 0,
  92. { 0x0001,0x0002,0x0003,0x0004,0x0000 } },
  93. },
  94. /* 3 */
  95. {{{ 0x30A2,0xFF71,0x0000 },
  96. { 0x0000 }, },
  97. { 0, 0, 0,
  98. { 0x30A2,0xFF71,0x0000 } },
  99. },
  100. /* 4 */
  101. {{{ 0x0001,0xFFFF,0x0000 },
  102. { 0x0080,0x0090,0x0000 }, },
  103. { 0, 0, 0,
  104. { 0x0001,0xFFFF,0x0080,0x0090,0x0000 } },
  105. },
  106. {.is_last = 1}
  107. }
  108. },
  109. {
  110. {Twcscat, TST_LOC_end}
  111. }
  112. };