4.89. kink/test/TEST_TOOL¶
Launcheable mod for unit tests.
Usage: kink [Kink_options]... mod:kink/test/TEST_TOOL [Mod_options]... Path...
If `Path` is a path of a file, this is considered a test script, and tests in the file are collected.
If `Path` is a path of a directory, all the files recursively matching *_test.kn are considered as test programs, and tests in the files are collected. The name pattern matching is done case-insensitively.
Test program files are read by UTF-8 charset.
Tests in a test program are grouped with the file path as the group name. For example, if a test program test/calc_test.kn includes a test named “answer is 42”, its address becomes “test/calc_test.kn; answer is 42”
Mod_options
• --help / -h :: Print the help text and exit.
• --label Label / -l Label :: Adds `Label` as a label to pass to test functions.
• --verbose / -v :: Show progress verbosely.
Exit status
If an IO error or a compile error happens, or an exception is raised during collecting phase, the program exits with non-zero.
If one or more test results in an error, the program exists with non-zero.
If no test results in an error, the program exists with zero.
4.89.1. TEST_TOOL.main(Argv)¶
Launcher of kink/test/TEST_TOOL mod.