Skip to content

Test runner: expect-stdout lines are the whole stdout, in order, once each (#1855) - #1895

Merged
ehartford merged 6 commits into
fix-literalsfrom
fix-runner
Sep 29, 2026
Merged

ehartford merged 6 commits into
fix-literalsfrom
fix-runner

Conversation

@ehartford

@ehartford ehartford commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Stack #1898, layer 10. Closes #1855. The substring matcher hid #1864 (precondition_lazy.w; noted as a known issue in the fixture) and empty expectations that checked nothing; fixtures corrected to list their whole stdout in order. expect-check-pass was never a directive; check-only is. Draft until the stack battery is green and posted.

@ehartford
ehartford added this pull request to stack #1898 September 29, 2026 05:03
@ehartford ehartford changed the title fix runner Test runner: expect-stdout lines are the whole stdout, in order, once each (#1855) Sep 29, 2026
Eric Hartford added 6 commits September 29, 2026 14:40
…1855)

Mechanical rewrite (a With tool over the runner's own captures) of the 14
fixtures that listed a subset of their lines, plus the five whose headers the
runner never read: two `expect-run-output:` lines, two `//! N` lines that had
lost their `expect-stdout:`, and an `expect-stdout-not:` the exact rule
subsumes. No expectation changed meaning; each now pins every line once.
…ssage eagerly and the substring runner hid it (#1855)
… each (#1855)

`test_validate_output` passed when each expected line was a substring of
the output: order, line boundaries and count were never checked, so
`drop 1` passed on `drop 10`, a double drop's repeated line passed, and
drops printed after `end` passed. Now the `expect-stdout` lines are
compared with the program's stdout line for line; a failure names its
class (a line missing, printed only inside a longer line, printed N times
instead of M, out of order, or unlisted lines) and shows both sides around
the first difference. `expect-stdout-contains:` keeps the fragment rule
for output no run repeats and is refused beside `expect-stdout` or empty.
A `//!` header line the runner does not read fails loudly (the corpus
held `expect-run-output:`, `expect-stdout-not:`, `expect-check-pass` and
bare `//! 65` lines nothing checked); tools/debug_drop.w's directives are
recognised as another lane's. The selfhost smoke test proves each of the
old silent passes now fails and the two green forms pass.
@ehartford
ehartford marked this pull request as ready for review September 29, 2026 18:57
@ehartford
ehartford merged commit c4a2863 into main Sep 29, 2026
@ehartford
ehartford deleted the fix-runner branch September 29, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test runner: expect-stdout lines are matched as substrings of the whole output (no order, no count, no line boundary)

1 participant