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 <string.h>
 4
 5/*
 6output:
 7testing
 8done
 9end:
10*/
11
12int
13main()
14{
15        puts("testing");
16
17        assert(strncmp("abc", "abc", 3) == 0);
18        assert(strncmp("abcd", "abce", 3) == 0);
19        assert(strncmp("abc", "abc", 4) == 0);
20        assert(strncmp("abcd", "abef", 4) < 0);
21        assert(strncmp("abcf", "abcd", 4) > 0);
22        assert(strncmp("abc", "abe", 0) == 0);
23        assert(strncmp("", "", 1) == 0);
24        assert(strncmp("abc", "", 3) > 0);
25        assert(strncmp("", "abc", 3) < 0);
26
27        puts("done");
28
29        return 0;
30}