You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test runner: expect-stdout lines are matched as substrings of the whole output (no order, no count, no line boundary) #1855
Tool defect: //! expect-stdout: checks each line as a substring of the whole stdout
src/main.wtest_validate_output (at 725478e0: lines 4085-4091) passes when actual.contains(expected) for each expected line:
Order is never checked.
Line boundaries are never checked, so drop 1 is satisfied by drop 10 or undrop 1x.
Count is never checked: a line printed twice, which is what a double drop looks like, still passes.
This matters because behavior tests pin drop order and drop-exactly-once by listing lines. Found while fixing #1851: a test whose drops printed after end passed on the unfixed compiler. The #1847 and #1854 behavior tests list drop N lines in order and do not pin what they claim. Their follow-up rewrites them as one trace line, which the substring rule does check exactly.
Proposed rule
The expect-stdout lines, in order, are the program's stdout lines (or a contiguous run of them). Tests that want "contains" semantics already exist; they would need an explicit directive such as expect-stdout-contains:. Any change of the default has to sweep the whole corpus first: 2307 expect-stdout directives under test/behavior alone.
Activity
Parser: a `{ }` block holding one binding or defer is still its scope…
test: #1847's and #1854's behavior tests pin drop order and count in …
Globals: a call, dyn dispatch, stored callable or drop that writes a …
Test runner: expect-stdout lines are the whole stdout, in order, once…
test: the D acceptance corpus runs as the std fallback tier will reso…
test: the D acceptance corpus runs as the std fallback tier will reso…
test: the D acceptance corpus runs as the std fallback tier will reso…
Build store, runner, corpora, deps discovery, generic-instance identi…