blob: 984f4349f57fcaa02bd24026fece0e9bf26e1c09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# 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:
}
|