- POSIX runner: require SHELL_BIN from env, remove fortsh fallback paths
- Export BASH_REF as alias for REF_SHELL (POSIX scripts use BASH_REF)
- Copy test_harness.sh to suites/builtins/ for builtin test sourcing
- Fix test_harness.sh source paths: portable/ goes up one dir,
extended/fortsh/ goes up two dirs
- Clean up stale fortsh references in runner comments
- Spawn shell with profile's rc_disable.flags (e.g. --norc --noprofile)
- After initial prompt wait, send prompt_set_command from profile
to force a known prompt pattern
- Use generous timeout for initial prompt detection
Fixes: bash sessions now start with clean environment and known
prompt instead of inheriting .venv PS1 and bashrc output.
- Fix broken candidates list from fortsh binary path removal
- Add --spec-dir argument for external spec directories
- Load profile from BENSCH_PROFILE env var
- Use rglob to find YAML specs recursively in subdirectories
- Fix duplicate -s short flag between --shell and --spec
Executable POSIX sh script that wires a shell binary to test suites.
Usage: bensch --shell /bin/bash --suite posix,interactive
Features:
- Auto-detects profile from shell binary name
- Exports SHELL_BIN, REF_SHELL, RC_DISABLE_ENV for child processes
- Dispatches to POSIX (shell scripts), interactive (Python PTY),
and builtin (shell scripts) runners
- --list-suites and --list-profiles for discovery
- Sets up Python venv automatically for interactive tests
Runner checks profile capabilities and skip list before running
each YAML spec. Shells without readline skip editing/history/
completion. Shells without vi_mode skip vi_mode.yaml. Profile
skip list patterns are matched against spec file paths.
Skipped suites show clear [SKIP] message with reason.
- Remove 'for fortsh' from all spec headers
- Parameterize shell name test ($0) and prompt test (shell-specific)
- Generalize implementation notes (FZF, Home key, Ctrl+D)
- Rename temp files from fortsh_pty_test_file to bensch_test_file
Zero fortsh references remain in any YAML spec.
ShellPTY now accepts a profile dict. The start() method applies
test_mode_env, history_disable.env, and rc_disable.env from the
profile instead of hardcoded FORTSH_* environment variables.
Prompt pattern falls through: explicit > profile > default.
Zero FORTSH references remain in shell_pty.py.
POSIX scripts that prepended FORTSH_RC_FILE=/dev/null now use
env \$RC_DISABLE_ENV — set by the profile system to the appropriate
rc-disable mechanism for each shell.
Also clean FORTSH_PATH -> RESOLVED_SHELL in run_posix_tests.sh.
39 files updated. SHELL_BIN is now required (no default path).
Scripts that previously defaulted to ../bin/fortsh now error
with "SHELL_BIN must be set" if the variable is unset.
test_abbr, test_defun, test_config, test_memory, test_perf, test_help
These test builtins unique to fortsh (abbreviations, function syntax,
memory pool stats, performance counters).
Source: fortsh/tests/builtins/
test_complete_compgen.sh, test_coproc.sh, test_let.sh — bash extensions
not part of POSIX but supported by bash, zsh, ksh, fortsh.
Source: fortsh/tests/builtins/