"Module":"tap",
"Title":"tap - Test Anything Protocol",
"Author":"dinesh",
"Dependencies":[
]
"Description":[
{
"str":""
},
{
"str":"The tap package produces simple-to-parse mainly-human-readable test"
},
{
"str":"output to assist in the writing of test cases.  It is based on the"
},
{
"str":"(now-defunct) libtap, which is based on Perl's CPAN TAP module.  Its"
},
{
"str":"output can be parsed by a harness such as CPAN's Prove."
},
{
"str":""
},
{
"str":"CCAN testcases are expected to output the TAP format, usually using"
},
{
"str":"this package."
},
{
"str":""
},
{
"str":"For more information about TAP, see:"
},
{
"str":"	http://en.wikipedia.org/wiki/Test_Anything_Protocol"
},
{
"str":""
},
{
"str":"Based on the original libtap, Copyright (c) 2004 Nik Clayton."
},
{
"str":""
},
{
"str":"Example:"
},
{
"str":"	#include <string.h>"
},
{
"str":"	#include "tap/tap.h""
},
{
"str":""
},
{
"str":"	// Run some simple (but overly chatty) tests on strcmp()."
},
{
"str":"	int main(int argc, char *argv[])"
},
{
"str":"	{"
},
{
"str":"		const char a[] = "a", another_a[] = "a";"
},
{
"str":"		const char b[] = "b";"
},
{
"str":"		const char ab[] = "ab";"
},
{
"str":""
},
{
"str":"		plan_tests(4);"
},
{
"str":"		diag("Testing different pointers (%p/%p) with same contents","
},
{
"str":"		     a, another_a);"
},
{
"str":"		ok1(strcmp(a, another_a) == 0);"
},
{
"str":""
},
{
"str":"		diag("'a' comes before 'b'");"
},
{
"str":"		ok1(strcmp(a, b) < 0);"
},
{
"str":"		ok1(strcmp(b, a) > 0);"
},
{
"str":""
},
{
"str":"		diag("'ab' comes after 'a'");"
},
{
"str":"		ok1(strcmp(ab, a) > 0);"
},
{
"str":"		return exit_status();"
},
{
"str":"	}"
},
]
