A tiny TAP generator library and TAP parser in C for Linux, OSX
picotap is a tiny TAP generator library (test) and TAP parser (test harness) written in C. It was inspired by code in kazuho's github projects.
C Prequisites:
- tap requires GCC or clang/LLVM on Linux or OSX
If you get stuck in Linux or OSX, try typing make help or looking at the Examples directory.
Try the following:
makemake helpmake libtapmake ptapmake installmake testsmake runtestmake runtap
- In
picotap/, type:make libtap - Include
tap.hinto your test file - Start your test source with
plan( 10 ); // If your test plan includes 10 tests - Each test is of the form
ok( condition, "Info about the test" ); conditioncan be any expression that resolves totrue/false- For output to stdout not part of the test plan results
- Prefix with a
space,tab, or#
- Prefix with a
- Compile your test code by including the path to
tap.hand linking tolibptap.acc test.c -I./picotap -L. -lptap -o test.exe - See the
picotap/tdirectory and themake testscommand inpicotap/Makefile
- In
picotap/, type:make ptap - Execute the test via the tap parser
./ptap /PATH/TO/test.exe ptapwill open a pipe totest.exe, reading itsstdoutand parse it- For output to stdout not part of the test plan results
- Prefix with a
space,tab, or#
- Prefix with a