Skip to content

Offer: PR for CHOICE support, Unix build fixes, runtime bug fixes, and regression tests #8

@ostrich

Description

@ostrich

I started out just wanting to add CHOICE support to Picobat so I could run a batch Tetris script under it. That turned into a larger cleanup pass because each step exposed another real issue.

Progression was roughly:

  1. I added a CHOICE builtin.
  2. While trying to build/test it on Linux, I hit build/bootstrap problems, so I fixed the Unix config detection and build wiring first.
  3. Once the tree built, I cleaned up a number of compiler warnings and portability issues. Some of those also turned out to be real bugs, not just warning noise.
  4. I then expanded the test coverage substantially.
  5. Running those tests exposed several runtime bugs in pipes, redirection, COPY, CALL, IF ERRORLEVEL, etc., so I fixed those too.

I used Codex heavily during this work, both to help inspect the codebase and to iteratively implement/test fixes.

Current change summary:

  • add a CHOICE builtin with /C, /N, /CS, /D, /T, /M, timeout/default handling, and DOS-style /T:X,1
  • fix Unix build/config detection and build ordering issues
  • fix a number of portability/type/header issues across the codebase
  • fix several real runtime bugs:
    • pipe/input/output handling
    • redirection truncation vs append
    • COPY /Y
    • CALL behavior for call set ... and call %0 label ...
    • IF ERRORLEVEL
    • helper dump bugs used by tests
  • add a much larger regression test suite

If this sounds useful, I’m happy to submit it as a PR against the dev branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions