vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
_info
(1486B)
1 #include "config.h"
2 #include <stdio.h>
3 #include <string.h>
4
5 /**
6 * tap - Test Anything Protocol
7 *
8 * The tap package produces simple-to-parse mainly-human-readable test
9 * output to assist in the writing of test cases. It is based on the
10 * (now-defunct) libtap, which is based on Perl's CPAN TAP module. Its
11 * output can be parsed by a harness such as CPAN's Prove.
12 *
13 * CCAN testcases are expected to output the TAP format, usually using
14 * this package.
15 *
16 * For more information about TAP, see:
17 * http://en.wikipedia.org/wiki/Test_Anything_Protocol
18 *
19 * Based on the original libtap, Copyright (c) 2004 Nik Clayton.
20 *
21 * License: BSD (2 clause)
22 *
23 * Example:
24 * #include <string.h>
25 * #include <ccan/tap/tap.h>
26 *
27 * // Run some simple (but overly chatty) tests on strcmp().
28 * int main(int argc, char *argv[])
29 * {
30 * const char a[] = "a", another_a[] = "a";
31 * const char b[] = "b";
32 * const char ab[] = "ab";
33 *
34 * plan_tests(4);
35 * diag("Testing different pointers (%p/%p) with same contents",
36 * a, another_a);
37 * ok1(strcmp(a, another_a) == 0);
38 *
39 * diag("'a' comes before 'b'");
40 * ok1(strcmp(a, b) < 0);
41 * ok1(strcmp(b, a) > 0);
42 *
43 * diag("'ab' comes after 'a'");
44 * ok1(strcmp(ab, a) > 0);
45 * return exit_status();
46 * }
47 *
48 * Maintainer: Rusty Russell <rusty@rustcorp.com.au>
49 */
50 int main(int argc, char *argv[])
51 {
52 if (argc != 2)
53 return 1;
54
55 if (strcmp(argv[1], "depends") == 0) {
56 printf("ccan/compiler\n");
57 return 0;
58 }
59
60 return 1;
61 }