As the general text-based test controller (runTestText) executes a test, it reports each test case start, error, and failure by constructing a string and passing it to the function embodied in a PutText. A report string is known as a "line", although it includes no line terminator; the function in a PutText is responsible for terminating lines appropriately. Besides the line, the function receives a flag indicating the intended "persistence" of the line: True indicates that the line should be part of the final overall report; False indicates that the line merely indicates progress of the test execution. Each progress line shows the current values of the cumulative test execution counts; a final, persistent line shows the final count values.
The PutText function is also passed, and returns, an arbitrary state
value (called st here). The initial state value is given in the
PutText; the final value is returned by runTestText.