File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Tests to ensure that the special vendors from golang.org/x/* in the
2
+ # standard Go distribution work.
3
+
4
+ env HOME=$WORK/home
5
+ mkdir $HOME
6
+ env GOPATH=$WORK/go
7
+
8
+ # Check path exists in GOROOT
9
+ exists $GOROOT/src/vendor/golang_org/x/crypto/poly1305/poly1305.go
10
+
11
+ # GOPATH mode
12
+ env GO111MODULE=off
13
+ cd go/src/example.com/hello
14
+ gopherjs test
15
+
16
+ # module mode - disabled pending https://github.com/golang/go/issues/26924
17
+ env GO111MODULE=on
18
+ cd $WORK
19
+ go mod edit -require=github.com/gopherjs/gopherjs@v0.0.0 -replace=github.com/gopherjs/gopherjs=$SELF
20
+ exec cat go.mod
21
+ gopherjs test
22
+
23
+ -- go.mod --
24
+ module mod
25
+
26
+ -- main.go --
27
+ package main
28
+
29
+ import (
30
+ "fmt"
31
+
32
+ // import for transitive dependency on golang_org/x/crypto/cryptobyte
33
+ _ "crypto/x509"
34
+ )
35
+
36
+ func main() {
37
+ fmt.Println("Hello World!")
38
+ }
39
+
40
+ -- go/src/example.com/hello/main.go --
41
+ package main
42
+
43
+ import (
44
+ "fmt"
45
+
46
+ // import for transitive dependency on golang_org/x/crypto/cryptobyte
47
+ _ "crypto/x509"
48
+ )
49
+
50
+ func main() {
51
+ fmt.Println("Hello World!")
52
+ }
You can’t perform that action at this time.
0 commit comments