rogpeppe / go-internal

Selected Go-internal packages factored out from the standard library
BSD 3-Clause "New" or "Revised" License
825 stars 67 forks source link

testscript: add Params.ContinueOnError #192

Closed rogpeppe closed 1 year ago

rogpeppe commented 1 year ago

This fixes a few issues around the existing testscript -continue flag. Notably:

We fix the above by making "continue on error" a first class part of testscript.Params, so the testscript logic actually knows about it.

To test it properly, we need a couple of hacks to make the output predictable. Unfortunately, those hacks are internal only, so it's hard to add similar tests to the cmd/testscript command to end-to-end test that, but the existing test should act as sufficient "smoke test" that the continue logic is wired up OK.