diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-08 13:27:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-08 13:27:39 +0200 |
commit | e333e79f9bdff82432e0fd7fcf7ae30ef8e3d092 (patch) | |
tree | 28f529433c399025e257596fabad848b82e3aead /src/testdir | |
parent | ea39176baab52b646d1e2676e662def718ddd365 (diff) | |
download | vim-git-e333e79f9bdff82432e0fd7fcf7ae30ef8e3d092.tar.gz |
patch 8.0.1678: errorformat "%r" implies "%>"v8.0.1678
Problem: Errorformat "%r" implies "%>". (Jan Gosmann)
Solution: Jump to before setting fmt_ptr. (Yegappan Lakshmanan,
closes #2785)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_quickfix.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index 070582dfb..b0e14e6ad 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -2582,6 +2582,29 @@ func Xmultifilestack_tests(cchar) call assert_equal(3, l1.items[1].lnum) call assert_equal('two.txt', bufname(l2.items[1].bufnr)) call assert_equal(5, l2.items[1].lnum) + + " Test for start of a new error line in the same line where a previous + " error line ends with a file stack. + let efm_val = 'Error\ l%l\ in\ %f,' + let efm_val .= '%-P%>(%f%r,Error\ l%l\ in\ %m,%-Q)%r' + let l = g:Xgetlist({'lines' : [ + \ '(one.txt', + \ 'Error l4 in one.txt', + \ ') (two.txt', + \ 'Error l6 in two.txt', + \ ')', + \ 'Error l8 in one.txt' + \ ], 'efm' : efm_val}) + call assert_equal(3, len(l.items)) + call assert_equal('one.txt', bufname(l.items[0].bufnr)) + call assert_equal(4, l.items[0].lnum) + call assert_equal('one.txt', l.items[0].text) + call assert_equal('two.txt', bufname(l.items[1].bufnr)) + call assert_equal(6, l.items[1].lnum) + call assert_equal('two.txt', l.items[1].text) + call assert_equal('one.txt', bufname(l.items[2].bufnr)) + call assert_equal(8, l.items[2].lnum) + call assert_equal('', l.items[2].text) endfunc func Test_multifilestack() |