test_mbstowcs_dynamic.c (277B)
1 #include "common.h" 2 3 #include <stdlib.h> 4 5 int main(int argc, char** argv) { 6 const char* mbstr = "z\u00df\u6c34\U0001f34c"; /* or u8"zß水🍌" */ 7 wchar_t wstr[5]; 8 mbstowcs(wstr, mbstr, 4); 9 10 CHK_FAIL_START 11 mbstowcs(wstr, mbstr, argc); 12 CHK_FAIL_END 13 14 return ret; 15 }