...

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

Documentation: cmd/go/testdata/script

     1[short] skip
     2env GO111MODULE=off
     3
     4# test folder should work
     5go test github.com/clsung/go-vendor-issue-14613
     6
     7# test with specified _test.go should work too
     8cd $GOPATH/src
     9go 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
    13stderr 'imported and not used'
    14
    15-- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./vendor_test.go --
    16package main
    17
    18import (
    19	"testing"
    20
    21	"github.com/clsung/fake"
    22)
    23
    24func 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 --
    33package myapp
    34import (
    35   "mylibtesttest/rds"
    36)
    37
    38-- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./vendor/mylibtesttest/rds/rds.go --
    39package rds
    40
    41-- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./vendor/github.com/clsung/fake/fake.go --
    42package fake
    43
    44func DoNothing() string {
    45	return "Ok"
    46}
    47
    48-- $GOPATH/src/github.com/clsung/go-vendor-issue-14613/./m.go --
    49package main
    50
    51func main() {}
    52

View as plain text