$ TEST_OPTS='filter=*:*default' make test/tigrc/width-test
All tests can be run with
make test. This will run all scripts that
-test in the
test folder and summarize the test results
using the script
To run individual tests, use
make <path-to-test> e.g.
test/tigrc/parse-test. Alternatively, tests can be run directly via the
test scripts as long as
PATH is set to include the directories
test/tools. The latter directory is where the test helper
libraries are located, the most important of which is
Tests can be configured by setting the
TEST_OPTS environment variable.
The variable should contain a space-separated list of options. The
following options are supported:
Whether to print individual test results even when all assertions passed. The default is to not show results for passed tests.
Do not indent test output. This is automatically set depending on whether
V=1was passed to
maketo show verbose output.
Invoke tig via a debugger, for example
debugger=lldb. When no program is specified it is auto-detected. Remember to recompile using
make clean all-debugto expose all symbols.
Only run test files or cases matching a shell-style glob filter. A colon separates the file glob from the case glob. No colon, or trailing colon, is equivalent to trailing
:*(all cases). Leading colon is equivalent to leading
*:(all files). The file portion is matched against a path fragment from the project root. Example:
This option is a convenience for development against specific tests. Test files and test cases are filtered, but not assertions. Thus some assertions are expected to fail in the presence of a filter. Testing output originating from
makeis also not filtered.
Show trace information.
Run TODO tests, which are otherwise skipped.
Run tests and verify memory access with Valgrind.
Set the default timeout for each invocation of tig under the test harness. The default is 10 if unset. 0 means "no timeout". Individual tests may override the value.