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 RequireUniqueNames parameter #185

Closed twpayne closed 1 year ago

twpayne commented 1 year ago

Fixes #184.

twpayne commented 1 year ago

The test failure seems unrelated to this PR.

twpayne commented 1 year ago

There's also a conflict, but I imagine it's a trivial one.

The conflict is indeed trivial, but the tests no longer pass. Specifically, the test that testscript should return an error when duplicate names are encountered fails. I've traced this as far as verifying that ts.Fatalf is called in ts.setup when duplicate names are found, but this does not result in testscript returning an error. It should.

I suspect that #192 might be related. Specifically, does #192 cope with ts.Fatalf being called in ts.setup? I get the impression that the error is now silently swallowed somewhere rather than being returned. cc @rogpeppe

rogpeppe commented 1 year ago

@twpayne You're right: there was indeed an issue in that area that I'd overlooked. I've proposed #193 to fix that.

mvdan commented 1 year ago

Please rebase and try again :)

twpayne commented 1 year ago

Thanks both! I've rebased and now the test passes :)