SHTK_UNITTEST(1)
SHTK_UNITTEST(1) General Commands Manual SHTK_UNITTEST(1)

unittestTest program implemented using shtk's unittest library

test-program [-t test-case]

This manual page documents the general command-line interface to test programs written using the shtk_unittest(3) library.

Unless told otherwise, the test program runs the test cases it contains in-process. The order in which the test cases are run is not pre-determined.

The tests are executed in the current directory, so they are subject to cross-test pollution if they do not clean up after themselves properly. It is highly recommended that you use kyua(1) to orchestrate the execution of these test programs.

The following options are supported:

test-case
Restricts the set of executed test cases to the one given in test-case. This flag can be provided multiple times to tell the test program which collection of test cases to run.

Standalone test cases are identified by their bare name, and test cases within a fixture are identified by the fixture's name and the test case's name pair separated by two underscore characters, like in: ‘fixture__test_name’.

Note that the test program does not currently respect the order in which you provided the -t flags.

The test program returns 0 if all executed tests passed, or 1 if there was a problem either in the invocation or in the execution of the tests. In particular, if filtering of test cases is requested with -t and the given tests do not match any test case, the test program will exit with a 1 error code.

shtk_unittest(3)

unittest first appeared in shtk 1.6. The -t flag appeared in shtk 1.8.

June 11, 2017 Debian