]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgo/go/cmd/go/testdata/script/build_multi_main.txt
libgo: update to Go1.14beta1
[thirdparty/gcc.git] / libgo / go / cmd / go / testdata / script / build_multi_main.txt
CommitLineData
aa8901e9
ILT
1# Verify build -o can output multiple executables to a directory.
2
3mkdir $WORK/bin
4go build -o $WORK/bin ./cmd/c1 ./cmd/c2
5! stderr 'multiple packages'
6
7! go build -o $WORK/bin ./pkg1 ./pkg1
8stderr 'no main packages'
9
10! go build ./cmd/c1
11stderr 'already exists and is a directory'
12
5a8ea165
ILT
13# Verify build -o output correctly local packages
14mkdir $WORK/local
15go build -o $WORK/local ./exec.go
16exists $WORK/local/exec$GOEXE
17
aa8901e9
ILT
18-- go.mod --
19module exmod
20
21-- cmd/c1/main.go --
22package main
23
24func main() {}
25
26-- cmd/c2/main.go --
27package main
28
29func main() {}
30
31-- pkg1/pkg1.go --
32package pkg1
33
34-- pkg2/pkg2.go --
35package pkg2
36
5a8ea165
ILT
37-- exec.go --
38package main
39
40func main() {}
41
aa8901e9
ILT
42-- c1$GOEXE/keep.txt --
43Create c1 directory.