...

Text file src/cmd/go/testdata/script/vendor_complex.txt

Documentation: cmd/go/testdata/script

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

View as plain text