hexpm/ltest0.14.0ldoc

ltest-listener

Collect EUnit events and render the ltest report.

--loaded-ltest-records--/0function

--loaded-ltest-records--/0

Return ok. This dummy function marks the end of the include so the REPL prints its name as the last function loaded.

assertion-failure?/1function

assertion-failure?/1

Return true for EUnit assertion failure tags handled by this listener; return false for other reasons.

handle_begin/3function

handle_begin/3

Handle an EUnit begin event, writing recognized group and test headings or lines; return the unchanged listener state.

handle_cancel/3function

handle_cancel/3

Write the EUnit cancellation reason and increment the cancel counter; return the updated listener state.

handle_end/3function

handle_end/3

Handle an EUnit end event: update result counters or account for each module's skips and elapsed time once, then return the updated state.

init/1function

init/1

Create listener state with empty per-module status and zeroed counters; use color=true and test-type=unit when those options are absent.

is-file-desc?/1function

is-file-desc?/1

Return true when DESC is a binary beginning with file ; this checks only the prefix, not descriptor completeness.

module-for-desc/1function

module-for-desc/1

Return the module atom for a valid EUnit file or quoted module descriptor; return undefined for other prefixes. File/BEAM errors propagate.

record-module-group/3function

record-module-group/3

Add each module's manual skips and TIME once across file/module groups; malformed descriptors and BEAM lookup errors propagate.

start/0function

start/0

Call eunit_listener:start/2 with this listener and no options; return its result.

start/1function

start/1

Forward OPTIONS to eunit_listener:start/2 and return its result; spawn options can affect that result.

sync_end/1function

sync_end/1

Return RESULT unchanged; this compatibility helper sends no EUnit message and performs no IO.

terminate/2function

terminate/2

Write the final report for EUnit's successful terminate callback and return its state tuple; on callback error, print the internal error and return the listener callback tuple.

update-skips/2function

update-skips/2

Add SKIPS to the skipped-test counter in listener state.

update-time/2function

update-time/2

Add TIME to the elapsed-time field in listener state.