Commits

trunk
Switch branches/tags
All users
All time
March 2026
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 1 2 3 4
5 6 7 8 9 10 11

Commits on April 6, 2026

  1. add compliance matrix to README — 11 shells tested
    POSIX, builtin, and integration results for bash, osh, mksh, yash,
    dash, zsh, fish, rc, elvish, /bin/sh, and macOS ksh (broken).
    
    OSH (Oils) shows 93% POSIX compliance — strong bash replacement.
    mksh and yash beat zsh on POSIX compliance.
    espadonne committed

Commits on April 5, 2026

  1. fix builtin runner: search portable/ and extended/ subdirectories
    The runner was globbing test_*.sh in its own directory but tests
    are now organized in portable/ and extended/ subdirectories.
    espadonne committed
  2. fix test runner paths and bridge env variables for full suite
    - 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
    espadonne committed
  3. pass rc-disable flags and set prompt at session start
    - 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.
    espadonne committed
  4. fix runner: syntax error, spec-dir support, profile loading
    - 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
    espadonne committed
  5. write .docs/overview.md
    Project context, extraction rationale, architecture decisions,
    maintenance plan for keeping fortsh and bensch in sync.
    espadonne committed
  6. write documentation: YAML spec format, shell profiles, writing tests
    docs/yaml-spec-format.md — complete reference for test YAML format
    docs/shell-profiles.md — profile system, creating profiles, capabilities
    docs/writing-tests.md — guidelines for portable shell-agnostic tests
    espadonne committed
  7. write README.md
    Project description, quick start, architecture overview, suite
    descriptions, profile system explanation, requirements, structure.
    espadonne committed
  8. create bensch entry point
    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
    espadonne committed
  9. add capability-gated suite selection
    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.
    espadonne committed
  10. clean fortsh-specific content from YAML test specs
    - 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.
    espadonne committed
  11. integrate profiles into test runner session reset
    YAMLTestRunner accepts profile dict. Session reset uses
    profile's mode_reset_command and prompt_set_command instead of
    hardcoded 'set -o emacs; PS1="> "'.
    
    ShellPTY instantiation passes profile through for env config.
    espadonne committed
  12. integrate profiles into PTY engine
    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.
    espadonne committed
  13. add shell profile system
    framework/profile.py — loads YAML profiles, auto-detects profile
    from shell binary name, provides capability queries and rc-disable
    env generation.
    
    6 profiles: bash, zsh, dash, ksh, fortsh, generic.
    
    Each profile describes: prompt_pattern, prompt_set_command,
    mode_reset_command, rc_disable (flags + env), test_mode_env,
    history_disable, capabilities, and suite skip/extra lists.
    espadonne committed
  14. replace inline FORTSH_RC_FILE with RC_DISABLE_ENV
    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.
    espadonne committed
  15. generalize error normalization and rename fortsh references
    - normalize_shell_name() now catches any *sh: prefix, not just bash/fortsh
    - Debug output labels: 'fortsh:' -> 'shell:'
    - Variable names: fortsh_file -> shell_file, fortsh_code -> shell_code, etc.
    - Temp file paths: /tmp/fortsh_* -> /tmp/bensch_*
    - Comments and descriptions: 'for fortsh' -> generic
    espadonne committed
  16. replace FORTSH_BIN with SHELL_BIN across all shell scripts
    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.
    espadonne committed
  17. extract builtin test runner
    Source: fortsh/tests/builtins/run_builtin_tests.sh
    espadonne committed
  18. extract integration tests
    12 cross-feature integration tests: expansion, redirection, builtin
    cross-interaction, control flow, error handling, functions, pipelines,
    scope/env, subshells, job control, signals/traps.
    
    Source: fortsh/tests/builtins/integration/
    espadonne committed
  19. extract fortsh-specific builtin tests
    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/
    espadonne committed
  20. extract extended builtin tests (bash/zsh features)
    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/
    espadonne committed
  21. extract portable builtin tests
    32 shell-agnostic builtin test scripts using compare_output against
    BASH_REF. Covers alias, arithmetic, arrays, cd/pwd, declare, echo,
    eval, exec, export/unset, fc, flow control, getopts, hash, history,
    jobs/fg/bg, kill/wait, local, printf, pushd/popd, read, readonly,
    set/shopt, shift, source, stress, test, times, trap, type/command,
    ulimit, umask, variable ops.
    
    Source: fortsh/tests/builtins/
    espadonne committed
  22. extract POSIX compliance shell scripts
    17 posix_compliance_*.sh + 8 posix_gaps_*.sh + run_posix_tests.sh
    ~19,450 lines, ~3800 test assertions.
    
    Verbatim copies. FORTSH_BIN references will be replaced in Phase 4.
    
    Source: fortsh/tests/posix_*.sh, fortsh/tests/run_posix_tests.sh
    espadonne committed
  23. extract interactive specs: prompt, stress, auto-generated POSIX
    prompt_display.yaml -> suites/interactive/posix/
    stress.yaml -> suites/interactive/stress/
    7 posix_*_auto.yaml files -> suites/interactive/posix/
    
    Verbatim copies. 4254 lines, ~692 test cases.
    
    Source: fortsh/tests/interactive/test_specs/
    espadonne committed
  24. extract interactive specs: completion, signals, vi_mode
    completion.yaml -> suites/interactive/completion/
    signals_jobs.yaml -> suites/interactive/signals/
    vi_mode.yaml -> suites/interactive/editing/
    
    Verbatim copies. 1360 lines, ~102 test cases.
    
    Source: fortsh/tests/interactive/test_specs/
    espadonne committed
  25. extract core interactive YAML specs
    posix.yaml -> suites/interactive/posix/posix_core.yaml
    line_editing.yaml -> suites/interactive/editing/
    history.yaml -> suites/interactive/history/
    
    Verbatim copies. 1690 lines, ~220 test cases.
    
    Source: fortsh/tests/interactive/test_specs/
    espadonne committed
  26. extract shared test harness for shell script tests
    Rename FORTSH_BIN -> SHELL_BIN (now required, no default path).
    Keep BASH_REF as-is — semantically correct as reference shell.
    Rename temp file prefix fortsh_timeout -> bensch_timeout.
    
    Source: fortsh/tests/builtins/test_harness.sh
    espadonne committed
  27. extract pytest configuration
    Rename fixtures: fortsh -> shell, fortsh_path -> shell_path,
    fortsh_with_rc -> shell_with_rc, fortsh_factory -> shell_factory
    
    Source: fortsh/tests/interactive/conftest.py
    espadonne committed
  28. extract python dependencies
    pexpect, PyYAML, pytest, pytest-html, colorama — all shell-agnostic.
    
    Source: fortsh/tests/interactive/requirements.txt
    espadonne committed