_info 1.5 KB

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