sigildocs

(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 .testignore file and return list of patterns Each non-empty, non-comment line is a glob pattern

glob-match?procedure

Check if a path matches a glob pattern Supports: (any chars except /), * (any chars including /)

Make a path relative to a base directory

path-ignored?procedure

Check if path should be ignored based on patterns base-dir is used to make the path relative for matching

anyprocedure

Helper: any predicate matches

Find 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/ or tests/ directories

Find test files in a single directory (recursively)

is-test-file?procedure

Check if filename matches test file pattern

Discover tests from all packages in a workspace Searches packages/*/test/ directories Respects .testignore patterns in the base directory

Load a test file and return any tests it registered

Run tests from multiple files with options Options: ((filter . pattern) (compact . #t) (quiet . #t) (no-summary . #t) ...)

Run tests from multiple files (simple API)

Extract a nice group name from a file path e.g., "test/compiler/test-string.sgl" -> "test-string"

Run tests in quiet mode (no output except failures)

Run tests with verbose output

Group tests by their group name

assoc-stringprocedure

String-based assoc

string-equal?procedure

String equality (handles #f)

Filter tests by pattern if provided

Format milliseconds duration

Format seconds duration

Format decimal number with N decimal places

Convert value to display string

alist-getprocedure

Get value from alist

whensyntax

Conditional execution

Run 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

Convert 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>

Convert a native test result's individual tests to test-result records.

Merge multiple test summaries into one. Combines totals and results from all summaries.

summaries: list of <test-summary> records

Returns: combined <test-summary>

Run 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