@@ -244,6 +244,32 @@ func TestVendorTest2(t *testing.T) {
244
244
tg .run ("test" , "github.com/rsc/go-get-issue-11864/vendor/vendor.org/tx2" )
245
245
}
246
246
247
+ func TestVendorTest3 (t * testing.T ) {
248
+ testenv .MustHaveExternalNetwork (t )
249
+
250
+ tg := testgo (t )
251
+ defer tg .cleanup ()
252
+ tg .makeTempdir ()
253
+ tg .setenv ("GOPATH" , tg .path ("." ))
254
+ tg .run ("get" , "github.com/clsung/go-vendor-issue-14613" )
255
+
256
+ tg .run ("build" , "-i" , "github.com/clsung/go-vendor-issue-14613" )
257
+
258
+ // test folder should work
259
+ tg .run ("test" , "-i" , "github.com/clsung/go-vendor-issue-14613" )
260
+ tg .run ("test" , "github.com/clsung/go-vendor-issue-14613" )
261
+
262
+ // test with specified _test.go should work too
263
+ tg .cd (filepath .Join (tg .path ("." ), "src" ))
264
+ tg .run ("test" , "-i" , "github.com/clsung/go-vendor-issue-14613/vendor_test.go" )
265
+ tg .run ("test" , "github.com/clsung/go-vendor-issue-14613/vendor_test.go" )
266
+
267
+ // test with imported and not used
268
+ tg .run ("test" , "-i" , "github.com/clsung/go-vendor-issue-14613/vendor/mylibtesttest/myapp/myapp_test.go" )
269
+ tg .runFail ("test" , "github.com/clsung/go-vendor-issue-14613/vendor/mylibtesttest/myapp/myapp_test.go" )
270
+ tg .grepStderr ("imported and not used:" , `should say "imported and not used"` )
271
+ }
272
+
247
273
func TestVendorList (t * testing.T ) {
248
274
testenv .MustHaveExternalNetwork (t )
249
275
0 commit comments