/
simple.txt
43 lines (39 loc) · 1.01 KB
/
simple.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# With .gomodproxy supporting files, any GOPROXY from the
# environment should be overridden by the test proxy.
# Note that we want an empty GOMODCACHE, to ensure we have to download modules
# from our proxy.
env GOPROXY=0.1.2.3
unquote file.txt
testscript -v file.txt
stdout 'example.com/mod'
! stderr .+
-- file.txt --
>env GOMODCACHE=$WORK
>go list -m
>stdout 'example.com/mod'
>go list fruit.com/...
>stdout 'fruit.com/fruit'
>stdout 'fruit.com/coretest'
>-- go.mod --
>module example.com/mod
>
>require fruit.com v1.0.0
>-- .gomodproxy/fruit.com_v1.0.0/.mod --
>module fruit.com
>
>-- .gomodproxy/fruit.com_v1.0.0/.info --
>{"Version":"v1.0.0","Time":"2018-10-22T18:45:39Z"}
>
>-- .gomodproxy/fruit.com_v1.0.0/go.mod --
>module fruit.com
>
>-- .gomodproxy/fruit.com_v1.0.0/fruit/fruit.go --
>package fruit
>
>const Apple = "apple"
>-- .gomodproxy/fruit.com_v1.0.0/coretest/coretest.go --
>// package coretest becomes a candidate for the missing
>// core import in main above
>package coretest
>
>const Mandarin = "mandarin"