SHTK_UNITTEST(1) | General Commands Manual | SHTK_UNITTEST(1) |
unittest
— Test
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 all 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:
-t
test-caseStandalone 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.
unittest
first appeared in
shtk
1.6. The -t
flag
appeared in shtk
1.8.
June 11, 2017 | Debian |