(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
native-test-resultprocedureConstruct a native-test-result struct.
native-test-result?procedureTest if a value is a native-test-result struct.
native-test-result-executableprocedureGet the executable field of a native-test-result struct.
native-test-result-passedprocedureGet the passed field of a native-test-result struct.
native-test-result-failedprocedureGet the failed field of a native-test-result struct.
native-test-result-resultsprocedureGet the results field of a native-test-result struct.
parse-pass-lineprocedureParse a PASS: line and return (name . #t) Input: "PASS: testname" Returns: ("testname" . #t) or #f if not a PASS line
parse-fail-lineprocedureParse 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-summary-lineprocedureParse a SUMMARY: line Input: "SUMMARY: X passed, Y failed" Returns: (passed . failed) or #f if not a SUMMARY line
print-native-test-lineprocedurePrint a native test result line indent: number of spaces to indent name: test name passed?: whether test passed message: failure message (optional)
make-stringprocedureCreate a string of N characters
make-listprocedureCreate a list of N items
run-native-testprocedureRun 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-native-testsprocedureRun 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>