0048-wcscpy.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
0048-wcscpy.c (357B)
---
1 #include <assert.h>
2 #include <stdio.h>
3 #include <wchar.h>
4
5 /*
6 output:
7 testing
8 done
9 end:
10 */
11
12 int
13 main()
14 {
15 wchar_t test[]= {'t', 'e', 's', 't', 0};
16 wchar_t *s, buf[40];
17
18 puts("testing");
19
20 s = wcscpy(buf, test);
21 assert(s == buf);
22 assert(!wcscmp(s, test));
23
24 s = wcscpy(buf, L"");
25 assert(s == buf);
26 assert(!wcscmp(s, L""));
27
28 puts("done");
29
30 return 0;
31