libgo: update to Go 1.11
[official-gcc.git] / libgo / go / cmd / go / testdata / script / mod_multirepo.txt
blob7f977e80f6e26060bc989c519ff044cde7ef8eee
1 env GO111MODULE=on
3 # initial standalone module should use no downloaded modules
4 go list -deps -f {{.Dir}}
5 ! stdout 'pkg[\\/]mod'
7 # v2 import should use a downloaded module
8 # both without an explicit go.mod entry ...
9 cp tmp/use_v2.go x.go
10 go list -deps -f {{.Dir}}
11 stdout 'pkg[\\/]mod[\\/]rsc.io[\\/]quote[\\/]v2@v2.0.1$'
13 # ... and with one ...
14 cp tmp/use_v2.mod go.mod
15 go list -deps -f {{.Dir}}
16 stdout 'pkg[\\/]mod[\\/]rsc.io[\\/]quote[\\/]v2@v2.0.1$'
18 # ... and even if there is a v2 module in a subdirectory.
19 mkdir v2
20 cp x.go v2/x.go
21 cp tmp/v2.mod v2/go.mod
22 go list -deps -f {{.Dir}}
23 stdout 'pkg[\\/]mod[\\/]rsc.io[\\/]quote[\\/]v2@v2.0.1$'
25 -- go.mod --
26 module rsc.io/quote
28 -- x.go --
29 package quote
31 -- tmp/use_v2.go --
32 package quote
33 import _ "rsc.io/quote/v2"
35 -- tmp/use_v2.mod --
36 module rsc.io/quote
37 require rsc.io/quote/v2 v2.0.1
39 -- tmp/v2.mod --
40 package rsc.io/quote/v2