blob: 984f4349f57fcaa02bd24026fece0e9bf26e1c09 [file] [log] [blame]
# For issue golang.org/issue/41084
[short] skip
! go test -v examplegoexit
stdout '(?s)--- PASS.*--- FAIL.*'
stdout 'panic: test executed panic\(nil\) or runtime\.Goexit'
-- go.mod --
module examplegoexit
go 1.16
-- example_test.go --
package main
import (
"fmt"
"runtime"
)
func ExamplePass() {
fmt.Println("pass")
// Output:
// pass
}
func ExampleGoexit() {
runtime.Goexit()
// Output:
}