summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/testdata/script/build_trimpath.txt
blob: f785b0cb9ec9d112937db49dff6d540694ff333e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[short] skip

env -r GOROOT_REGEXP=$GOROOT
env -r WORK_REGEXP=$WORK
env GOROOT GOROOT_REGEXP WORK WORK_REGEXP

go build -trimpath -o hello.exe hello.go
! grep -q $GOROOT_REGEXP hello.exe
! grep -q $WORK_REGEXP hello.exe

env GO111MODULE=on
go build -trimpath -o fortune.exe rsc.io/fortune
! grep -q $GOROOT_REGEXP fortune.exe
! grep -q $WORK_REGEXP fortune.exe

-- hello.go --
package main
func main() { println("hello") }

-- go.mod --
module m