Skip to content

Commit

Permalink
update Test_GometaAutoSave to use location list
Browse files Browse the repository at this point in the history
  • Loading branch information
bhcleek committed Jan 20, 2018
1 parent f592349 commit 4b146cb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions autoload/go/lint_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ func! Test_GometaAutoSave() abort
\ {'lnum': 5, 'bufnr': 2, 'col': 1, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'w', 'pattern': '', 'text': 'exported function MissingDoc should have comment or be unexported (golint)'}
\ ]

" clear the quickfix lists
call setqflist([], 'r')
let winnr = winnr()

" clear the location lists
call setloclist(l:winnr, [], 'r')

" call go#lint#ToggleMetaLinterAutoSave from lint.vim so that the file will
" be autoloaded and the default for g:go_metalinter_autosave_enabled will be
Expand All @@ -89,11 +91,11 @@ func! Test_GometaAutoSave() abort

call go#lint#Gometa(1)

let actual = getqflist()
let actual = getloclist(l:winnr)
let start = reltime()
while len(actual) == 0 && reltimefloat(reltime(start)) < 10
sleep 100m
let actual = getqflist()
let actual = getloclist(l:winnr)
endwhile

call gotest#assert_quickfix(actual, expected)
Expand Down

0 comments on commit 4b146cb

Please sign in to comment.