sigildocs

(sigil test native)

(sigil test native) - Native Test Runner

Runs C test executables and parses their output in real-time. Output format expected from C tests: PASS: testname FAIL: testname - message (file:line) SUMMARY: X passed, Y failed

Results are printed with the same symbols as Sigil tests and returned as structured data for aggregation.

Exports

Construct a native-test-result struct.

Test if a value is a native-test-result struct.

Get the executable field of a native-test-result struct.

Get the passed field of a native-test-result struct.

Get the failed field of a native-test-result struct.

Get the results field of a native-test-result struct.

Parse a PASS: line and return (name . #t) Input: "PASS: testname" Returns: ("testname" . #t) or #f if not a PASS line

Parse a FAIL: line and return (name message . #f) Input: "FAIL: testname - message (file:line)" Returns: (("testname" . "message") . #f) or #f if not a FAIL line

Parse a SUMMARY: line Input: "SUMMARY: X passed, Y failed" Returns: (passed . failed) or #f if not a SUMMARY line

make-stringprocedure

Create a string of N characters

make-listprocedure

Create a list of N items

Run a single native test executable. Streams output in real-time, printing each test result.

executable: path to the test executable indent: number of spaces to indent output (default 4)

Returns: <native-test-result>

Run multiple native test executables. Prints header for each executable and streams results.

executables: list of paths to test executables base-indent: number of spaces for base indentation (default 2)

Returns: list of <native-test-result>