GitHub

Can I add extra tests to the C routines?

The idea with the testing is to move as many functions as possible "lower down"; i.e., to the lib/utils_*.c files. These functions can then be tested using the libtap routines in the lib/tests/test_*.c files. It is easier to do unit testing here than to try and do higher level plugin testing, because you can fake data easier at this level.

The routines available via libtap are equivalent to Perl's Test::Simple ones.

The libtap tests are separated out from the plugins ones (in plugins/t) because:

  1. They are testing the files in lib/, so should reside there.
  2. They require compiling to run.