(sigil test runner)
(sigil test runner) - Beautiful Test Runner for CLI
Provides test discovery, execution, and beautiful colored output for the sigil test command.
Exports
load-testignoreprocedureLoad .testignore file and return list of patterns Each non-empty, non-comment line is a glob pattern
glob-match?procedureCheck if a path matches a glob pattern Supports: (any chars except /), * (any chars including /)
make-relative-pathprocedureMake a path relative to a base directory
path-ignored?procedureCheck if path should be ignored based on patterns base-dir is used to make the path relative for matching
anyprocedureHelper: any predicate matches
discover-test-filesprocedureFind test files in a directory Looks for test-.sgl, -test.sgl, and files in test/ directories Respects .testignore patterns in the base directory
find-test-dirsprocedureFind test/ or tests/ directories
find-test-files-in-dirprocedureFind test files in a single directory (recursively)
is-test-file?procedureCheck if filename matches test file pattern
discover-workspace-testsprocedureDiscover tests from all packages in a workspace Searches packages/*/test/ directories Respects .testignore patterns in the base directory
load-test-fileprocedureLoad a test file and return any tests it registered
run-test-files-with-optionsprocedureRun tests from multiple files with options Options: ((filter . pattern) (compact . #t) (quiet . #t) (no-summary . #t) ...)
run-test-filesprocedureRun tests from multiple files (simple API)
file->group-nameprocedureExtract a nice group name from a file path e.g., "test/compiler/test-string.sgl" -> "test-string"
run-tests-quietprocedureRun tests in quiet mode (no output except failures)
run-tests-verbose-modeprocedureRun tests with verbose output
group-tests-by-groupprocedureGroup tests by their group name
assoc-stringprocedureString-based assoc
string-equal?procedureString equality (handles #f)
maybe-filter-testsprocedureFilter tests by pattern if provided
print-test-resultprocedurePrint a single test result
print-failure-detailsprocedurePrint failure details indented
print-test-summaryprocedurePrint the test summary
print-dividerprocedurePrint a divider line
format-durationprocedureFormat milliseconds duration
format-duration-secondsprocedureFormat seconds duration
format-decimalprocedureFormat decimal number with N decimal places
value->display-stringprocedureConvert value to display string
alist-getprocedureGet value from alist
whensyntaxConditional execution
run-native-test-suiteprocedureRun a suite of native test executables. Prints a header for native tests and runs each executable.
pkg-name: package name for header (e.g., "sigil-lib") executables: list of paths to test executables
Returns: <test-summary> with aggregated results
native-results->summaryprocedureConvert native test results to a test summary. Aggregates pass/fail counts from all native test results.
results: list of <native-test-result> records
Returns: <test-summary>
native-to-test-resultsprocedureConvert a native test result's individual tests to test-result records.
merge-test-summariesprocedureMerge multiple test summaries into one. Combines totals and results from all summaries.
summaries: list of <test-summary> records
Returns: combined <test-summary>
run-package-testsprocedureRun all tests for a package (both native and Sigil tests). Prints package header and runs both test types.
pkg-name: package name sigil-files: list of Sigil test file paths native-executables: list of native test executable paths options: alist of options (filter, compact, quiet, fail-fast, no-color, native-only, sigil-only)
Returns: <test-summary> with combined results