scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <assert.h>
 2#include <stdio.h>
 3#include <wchar.h>
 4
 5/*
 6output:
 7testing
 8ok
 9end:
10*/
11
12int
13main(void)
14{
15	wchar_t *s, buf[40];
16
17	puts("testing");
18	wcscpy(buf, L"case1:");
19	s = wcscat(buf, L"ok");
20	assert(s == buf);
21	assert(!wcscmp(s, L"case1:ok"));
22
23	wcscpy(buf, L"");
24	s = wcscat(buf, L"ok");
25	assert(s == buf);
26	assert(!wcscmp(s, L"ok"));
27
28	wcscpy(buf, L"case1:");
29	wcscat(buf, L"");
30	assert(s == buf);
31	assert(!wcscmp(s, L"case1:"));
32
33	puts("ok");
34
35	return 0;
36}