[][src]Module molt::test_harness

Molt Test Harness

A Molt test script is a Molt script containing tests of Molt code. Each test is a call of the Molt test command provided by the molt::test_harness module. The tests are executed in the context of the the application's molt::Interp (and so can test application-specific commands).

The test harness keeps track of the number of tests executed, and whether they passed, failed, or returned an unexpected error.

The molt-app tool provides access to the test harness for a standard Molt interpreter:

$ molt test test/all.tcl
Molt 0.1.0 -- Test Harness

171 tests, 171 passed, 0 failed, 0 errors

If a test fails or returns an error, the test harness outputs the details.

See the Molt Book (or the Molt test suite) for examples of test scripts.

Functions

test_harness

Executes the Molt test harness, given the command-line arguments, in the context of the given interpreter.