Mercurial > vim
comparison src/testdir/test_quickfix.vim @ 13612:89223f5d5d12 v8.0.1678
patch 8.0.1678: errorformat "%r" implies "%>"
commit https://github.com/vim/vim/commit/e333e79f9bdff82432e0fd7fcf7ae30ef8e3d092
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 8 13:27:39 2018 +0200
patch 8.0.1678: errorformat "%r" implies "%>"
Problem: Errorformat "%r" implies "%>". (Jan Gosmann)
Solution: Jump to before setting fmt_ptr. (Yegappan Lakshmanan,
closes #2785)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 08 Apr 2018 13:30:06 +0200 |
parents | 4d55eb79178b |
children | c38f29387245 |
comparison
equal
deleted
inserted
replaced
13611:60f7b362f2cf | 13612:89223f5d5d12 |
---|---|
2580 let l2 = g:Xgetlist({'nr':2, 'items':1}) | 2580 let l2 = g:Xgetlist({'nr':2, 'items':1}) |
2581 call assert_equal('one.txt', bufname(l1.items[1].bufnr)) | 2581 call assert_equal('one.txt', bufname(l1.items[1].bufnr)) |
2582 call assert_equal(3, l1.items[1].lnum) | 2582 call assert_equal(3, l1.items[1].lnum) |
2583 call assert_equal('two.txt', bufname(l2.items[1].bufnr)) | 2583 call assert_equal('two.txt', bufname(l2.items[1].bufnr)) |
2584 call assert_equal(5, l2.items[1].lnum) | 2584 call assert_equal(5, l2.items[1].lnum) |
2585 | |
2586 " Test for start of a new error line in the same line where a previous | |
2587 " error line ends with a file stack. | |
2588 let efm_val = 'Error\ l%l\ in\ %f,' | |
2589 let efm_val .= '%-P%>(%f%r,Error\ l%l\ in\ %m,%-Q)%r' | |
2590 let l = g:Xgetlist({'lines' : [ | |
2591 \ '(one.txt', | |
2592 \ 'Error l4 in one.txt', | |
2593 \ ') (two.txt', | |
2594 \ 'Error l6 in two.txt', | |
2595 \ ')', | |
2596 \ 'Error l8 in one.txt' | |
2597 \ ], 'efm' : efm_val}) | |
2598 call assert_equal(3, len(l.items)) | |
2599 call assert_equal('one.txt', bufname(l.items[0].bufnr)) | |
2600 call assert_equal(4, l.items[0].lnum) | |
2601 call assert_equal('one.txt', l.items[0].text) | |
2602 call assert_equal('two.txt', bufname(l.items[1].bufnr)) | |
2603 call assert_equal(6, l.items[1].lnum) | |
2604 call assert_equal('two.txt', l.items[1].text) | |
2605 call assert_equal('one.txt', bufname(l.items[2].bufnr)) | |
2606 call assert_equal(8, l.items[2].lnum) | |
2607 call assert_equal('', l.items[2].text) | |
2585 endfunc | 2608 endfunc |
2586 | 2609 |
2587 func Test_multifilestack() | 2610 func Test_multifilestack() |
2588 let lines = ['1', '2', 'one one one', '4', 'two two two', '6', '7'] | 2611 let lines = ['1', '2', 'one one one', '4', 'two two two', '6', '7'] |
2589 call writefile(lines, 'one.txt') | 2612 call writefile(lines, 'one.txt') |