gocomplete: do not suppress test failures

Ensure that the components of the `testing` package that rely on calling
`os.Exit` remain functional and any test failures are actually reported
back after the `monkey.Patch` in the `gocomplete.Example` test.

Fix #135
This commit is contained in:
Chris Nobody 2021-03-31 19:16:12 +03:00
parent 5d9f7f10f0
commit bf9b51caf4
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ func TestPredictions(t *testing.T) {
func BenchmarkFake(b *testing.B) {}
func Example() {
monkey.Patch(os.Exit, func(int) {})
p := monkey.Patch(os.Exit, func(int) {})
defer p.Unpatch()
os.Setenv("COMP_LINE", "go ru")
os.Setenv("COMP_POINT", "5")
main()