Skip to content

Commit

Permalink
Merge pull request #1033 from pborzenkov/coverage
Browse files Browse the repository at this point in the history
coverage: allow to run coverage on _test.go files in subdirs
  • Loading branch information
fatih authored Nov 24, 2016
2 parents 7c27c6b + 2b34076 commit b84f01a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autoload/go/coverage.vim
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function! go#coverage#overlay(file) abort
let cnt += 1
endwhile

let fname = expand('%:t')
let fname = expand('%')

" when called for a _test.go file, run the coverage for the actuall file
" file
Expand All @@ -241,6 +241,9 @@ function! go#coverage#overlay(file) abort
exe ":edit ". fnamemodify(fname, ":p")
endif

" cov.file includes only the filename itself, without full path
let fname = fnamemodify(fname, ":t")

for line in lines[1:]
let cov = go#coverage#parsegocoverline(line)

Expand Down

0 comments on commit b84f01a

Please sign in to comment.