-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testscript: fix RequireExplicitExec error messages
They used args[0], which is the first argument to the command, rather than the command name itself: > gofumpt foo.go FAIL: [...] use 'exec foo.go' rather than 'foo.go' (because RequireExplicitExec is enabled) I believe I introduced this regression when refactoring the pull request due to Roger's review, as I moved the code out of TestMain, where args[0] was still the name of the command to be run. Note that I can't easily add a regression test here, because the testscript command being used in the tests is not a top-level command run as a separate process, so it does not produce stdout nor stderr. The change seems easy enough to review manually, and our tests don't strictly check all error messages anyway. While here, remove the unnecessary use of -verbose.
- Loading branch information
Showing
3 changed files
with
144 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters