/** * Spec test runner - executes parsed spec tests against Bash */ import { Bash } from "../Bash.js"; import { type ParsedSpecFile, type TestCase } from "./parser.js"; export interface TestResult { testCase: TestCase; passed: boolean; skipped: boolean; skipReason?: string; /** Test was expected to fail (## SKIP) but unexpectedly passed */ unexpectedPass?: boolean; actualStdout?: string; actualStderr?: string; actualStatus?: number; expectedStdout?: string | null; expectedStderr?: string | null; expectedStatus?: number | null; error?: string; /** File path for the test file (used for UNEXPECTED PASS fix commands) */ filePath?: string; } export interface RunOptions { /** Only run tests matching this pattern */ filter?: RegExp; /** Custom Bash options */ bashEnvOptions?: ConstructorParameters[0]; /** File path for the test file */ filePath?: string; /** * Oils spec test convention (`## legacy_tmp_dir: yes` file header): the * test file references a `_tmp/` scratch directory relative to cwd that * must already exist before the script runs (real bash test runners * create it up front rather than each test case creating it itself). */ legacyTmpDir?: boolean; } /** * Run a single test case */ export declare function runTestCase(testCase: TestCase, options?: RunOptions): Promise; /** * Run all tests in a parsed spec file */ export declare function runSpecFile(specFile: ParsedSpecFile, options?: RunOptions): Promise; /** * Get summary statistics for test results */ export declare function getResultsSummary(results: TestResult[]): { total: number; passed: number; failed: number; skipped: number; };