From 2e102a11afe9b256f0f9cf5391faf445fd40430a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 19 Apr 2016 14:10:13 +0200 Subject: Initial import of test branch from vis repository --- core/ccan/tap/_info | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 core/ccan/tap/_info (limited to 'core/ccan/tap/_info') diff --git a/core/ccan/tap/_info b/core/ccan/tap/_info new file mode 100644 index 0000000..2b116de --- /dev/null +++ b/core/ccan/tap/_info @@ -0,0 +1,61 @@ +#include "config.h" +#include +#include + +/** + * tap - Test Anything Protocol + * + * The tap package produces simple-to-parse mainly-human-readable test + * output to assist in the writing of test cases. It is based on the + * (now-defunct) libtap, which is based on Perl's CPAN TAP module. Its + * output can be parsed by a harness such as CPAN's Prove. + * + * CCAN testcases are expected to output the TAP format, usually using + * this package. + * + * For more information about TAP, see: + * http://en.wikipedia.org/wiki/Test_Anything_Protocol + * + * Based on the original libtap, Copyright (c) 2004 Nik Clayton. + * + * License: BSD (2 clause) + * + * Example: + * #include + * #include + * + * // Run some simple (but overly chatty) tests on strcmp(). + * int main(int argc, char *argv[]) + * { + * const char a[] = "a", another_a[] = "a"; + * const char b[] = "b"; + * const char ab[] = "ab"; + * + * plan_tests(4); + * diag("Testing different pointers (%p/%p) with same contents", + * a, another_a); + * ok1(strcmp(a, another_a) == 0); + * + * diag("'a' comes before 'b'"); + * ok1(strcmp(a, b) < 0); + * ok1(strcmp(b, a) > 0); + * + * diag("'ab' comes after 'a'"); + * ok1(strcmp(ab, a) > 0); + * return exit_status(); + * } + * + * Maintainer: Rusty Russell + */ +int main(int argc, char *argv[]) +{ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) { + printf("ccan/compiler\n"); + return 0; + } + + return 1; +} -- cgit v1.2.3