1 [short] skip
2 env GO111MODULE=off
3
4 # test folder should work
5 go test github.com/clsung/go-vendor-issue-14613
6
7 # test with specified _test.go should work too
8 cd $GOPATH/src
9 go test github.com/clsung/go-vendor-issue-14613/vendor_test.go
10
11 # test with imported and not used
12 ! go test github.com/clsung/go-vendor-issue-14613/vendor/mylibtesttest/myapp/myapp_test.go
13 stderr 'imported and not used'
14
15 -- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./vendor_test.go --
16 package main
17
18 import (
19 "testing"
20
21 "github.com/clsung/fake"
22 )
23
24 func TestVendor(t *testing.T) {
25 ret := fake.DoNothing()
26 expected := "Ok"
27 if expected != ret {
28 t.Errorf("fake returned %q, expected %q", ret, expected)
29 }
30 }
31
32 -- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./vendor/mylibtesttest/myapp/myapp_test.go --
33 package myapp
34 import (
35 "mylibtesttest/rds"
36 )
37
38 -- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./vendor/mylibtesttest/rds/rds.go --
39 package rds
40
41 -- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./vendor/github.com/clsung/fake/fake.go --
42 package fake
43
44 func DoNothing() string {
45 return "Ok"
46 }
47
48 -- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./m.go --
49 package main
50
51 func main() {}
52
53
View as plain text