Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions autoload/gotests.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ function! gotests#tests() range
let tmplDir = ''
if (!empty(g:gotests_template_dir))
let tmplDir = '-template_dir ' . shellescape(g:gotests_template_dir)
elseif (!empty(g:gotests_template))
let tmplDir = '-template ' . shellescape(g:gotests_template)
elseif (!empty(g:gotests_template))
let tmplDir = '-template ' . shellescape(g:gotests_template)
endif

let file = expand('%')
Expand All @@ -44,8 +44,8 @@ function! gotests#alltests() abort
let tmplDir = ''
if (!empty(g:gotests_template_dir))
let tmplDir = '-template_dir ' . shellescape(g:gotests_template_dir)
elseif (!empty(g:gotests_template))
let tmplDir = '-template ' . shellescape(g:gotests_template)
elseif (!empty(g:gotests_template))
let tmplDir = '-template ' . shellescape(g:gotests_template)
endif

let file = expand('%')
Expand Down
4 changes: 4 additions & 0 deletions plugin/vim-gotests.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ if !exists('g:gotests_template_dir')
let g:gotests_template_dir = ''
endif

if !exists('g:gotests_template')
let g:gotests_template = ''
endif

command! -range GoTests <line1>,<line2>call gotests#tests()
command! GoTestsAll call gotests#alltests()