...
1# go build -buildmode=pie -race main.go on Darwin should work without errors
2
3[!race] skip 'test requires race detector support'
4
5[!GOOS:darwin] ! go build -buildmode=pie -race
6[!GOOS:darwin] stderr '^-buildmode=pie not supported when -race is enabled on '$GOOS'/'$GOARCH'$'
7[!GOOS:darwin] stop 'not testing -buildmode=pie -race on platform that does not support it'
8
9go build -buildmode=pie -race bytes
10! stderr .
11
12[short] stop 'not linking a binary in -short mode'
13
14go build -buildmode=pie -race main.go
15! stderr .
16exec ./main
17stdout 'Hello, 世界'
18
19-- go.mod --
20module m
21
22go 1.21
23-- main.go --
24package main
25
26import "fmt"
27
28func main() {
29 fmt.Println("Hello, 世界")
30}
View as plain text