You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
261 B

// RUN: %clang %s -o %t && %run %t 2>&1
#include <assert.h>
#include <stdlib.h>
int main(int argc, char **argv) {
char buff[10];
wchar_t x = L'a';
wctomb(NULL, x);
int res = wctomb(buff, x);
assert(res == 1);
assert(buff[0] == 'a');
return 0;
}