diff --git a/autoload/go/cmd.vim b/autoload/go/cmd.vim index 38b0328437..8c14b68469 100644 --- a/autoload/go/cmd.vim +++ b/autoload/go/cmd.vim @@ -188,6 +188,11 @@ endfunction function! go#cmd#Test(bang, compile, ...) let args = ["test"] + if empty(glob("*_test.go")) + call go#util#EchoError("no tests files available") + return + endif + " don't run the test, only compile it. Useful to capture and fix errors or " to create a test binary. if a:compile