1 env GO111MODULE=off
2
3 # smoke test for complex build configuration
4 go build -o complex.exe complex
5 [!cross] [exec:gccgo] go build -compiler=gccgo -o complex.exe complex
6
7 -- complex/main.go --
8 package main
9
10 import (
11 _ "complex/nest/sub/test12"
12 _ "complex/nest/sub/test23"
13 "complex/w"
14 "v"
15 )
16
17 func main() {
18 println(v.Hello + " " + w.World)
19 }
20
21 -- complex/nest/sub/test12/p.go --
22 package test12
23
24 // Check that vendor/v1 is used but vendor/v2 is NOT used (sub/vendor/v2 wins).
25
26 import (
27 "v1"
28 "v2"
29 )
30
31 const x = v1.ComplexNestVendorV1
32 const y = v2.ComplexNestSubVendorV2
33
34 -- complex/nest/sub/test23/p.go --
35 package test23
36
37 // Check that vendor/v3 is used but vendor/v2 is NOT used (sub/vendor/v2 wins).
38
39 import (
40 "v2"
41 "v3"
42 )
43
44 const x = v3.ComplexNestVendorV3
45 const y = v2.ComplexNestSubVendorV2
46
47 -- complex/nest/sub/vendor/v2/v2.go --
48 package v2
49
50 const ComplexNestSubVendorV2 = true
51
52 -- complex/nest/vendor/v1/v1.go --
53 package v1
54
55 const ComplexNestVendorV1 = true
56
57 -- complex/nest/vendor/v2/v2.go --
58 package v2
59
60 const ComplexNestVendorV2 = true
61
62 -- complex/nest/vendor/v3/v3.go --
63 package v3
64
65 const ComplexNestVendorV3 = true
66
67 -- complex/vendor/v/v.go --
68 package v
69
70 const Hello = "hello"
71
72 -- complex/w/w.go --
73 package w
74
75 const World = "world"
76
View as plain text