Skip to content

Commit

Permalink
Update quickfix test
Browse files Browse the repository at this point in the history
  • Loading branch information
airblade committed Jul 12, 2021
1 parent ca0f292 commit 7d9b712
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions test/test_gitgutter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -947,12 +947,27 @@ function Test_quickfix()
call setline(5, ['A', 'B'])
call setline(9, ['C', 'D'])
write
let bufnr1 = bufnr('')

edit fixture_dos.txt
call setline(2, ['A', 'B'])
write
let bufnr2 = bufnr('')

GitGutterQuickFix

let expected = [
\ {'lnum': 5, 'bufnr': bufnr(''), 'text': '-e'},
\ {'lnum': 9, 'bufnr': bufnr(''), 'text': '-i'}
\ {'lnum': 5, 'bufnr': bufnr1, 'text': '-e'},
\ {'lnum': 9, 'bufnr': bufnr1, 'text': '-i'},
\ {'lnum': 2, 'bufnr': bufnr2, 'text': "-b\r"}
\ ]

call s:assert_list_of_dicts(expected, getqflist())

GitGutterQuickFixCurrentFile

let expected = [
\ {'lnum': 2, 'bufnr': bufnr(''), 'text': "-b\r"},
\ ]

call s:assert_list_of_dicts(expected, getqflist())
Expand Down

0 comments on commit 7d9b712

Please sign in to comment.