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:
parent
5d9f7f10f0
commit
bf9b51caf4
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue