mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
patch 7.4.1569
Problem: Using old style tests for quickfix. Solution: Change them to new style tests. (Yegappan Lakshmanan)
This commit is contained in:
parent
00f9e0dbbd
commit
e27dba499a
@ -87,7 +87,6 @@ SCRIPTS_ALL = \
|
|||||||
test103.out \
|
test103.out \
|
||||||
test104.out \
|
test104.out \
|
||||||
test105.out \
|
test105.out \
|
||||||
test106.out \
|
|
||||||
test107.out \
|
test107.out \
|
||||||
test108.out \
|
test108.out \
|
||||||
test_autocmd_option.out \
|
test_autocmd_option.out \
|
||||||
@ -110,7 +109,6 @@ SCRIPTS_ALL = \
|
|||||||
test_match_conceal.out \
|
test_match_conceal.out \
|
||||||
test_nested_function.out \
|
test_nested_function.out \
|
||||||
test_options.out \
|
test_options.out \
|
||||||
test_qf_title.out \
|
|
||||||
test_ruby.out \
|
test_ruby.out \
|
||||||
test_search_mbyte.out \
|
test_search_mbyte.out \
|
||||||
test_signs.out \
|
test_signs.out \
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
Tests for errorformat. vim: set ft=vim ts=8 :
|
|
||||||
|
|
||||||
STARTTEST
|
|
||||||
:so small.vim
|
|
||||||
:if !has('quickfix') | e! test.ok | wq! test.out | endif
|
|
||||||
:set efm=%EEEE%m,%WWWW%m,%+CCCC%.%#,%-GGGG%.%#
|
|
||||||
:cgetexpr ['WWWW', 'EEEE', 'CCCC']
|
|
||||||
:$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
|
|
||||||
:cgetexpr ['WWWW', 'GGGG', 'EEEE', 'CCCC']
|
|
||||||
:$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
|
|
||||||
:cgetexpr ['WWWW', 'GGGG', 'ZZZZ', 'EEEE', 'CCCC', 'YYYY']
|
|
||||||
:$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
|
|
||||||
:/^Results/,$wq! test.out
|
|
||||||
ENDTEST
|
|
||||||
|
|
||||||
Results of test106:
|
|
@ -1,4 +0,0 @@
|
|||||||
Results of test106:
|
|
||||||
[['W', 1], ['E^@CCCC', 1]]
|
|
||||||
[['W', 1], ['E^@CCCC', 1]]
|
|
||||||
[['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]]
|
|
@ -1,18 +0,0 @@
|
|||||||
Tests for quickfix window's title vim: set ft=vim :
|
|
||||||
|
|
||||||
STARTTEST
|
|
||||||
:so small.vim
|
|
||||||
:if !has('quickfix') | e! test.ok | wq! test.out | endif
|
|
||||||
:set efm=%E%f:%l:%c:%m
|
|
||||||
:cgetexpr ['file:1:1:message']
|
|
||||||
:let qflist=getqflist()
|
|
||||||
:call setqflist(qflist, 'r')
|
|
||||||
:copen
|
|
||||||
:let g:quickfix_title=w:quickfix_title
|
|
||||||
:wincmd p
|
|
||||||
:$put =g:quickfix_title
|
|
||||||
:/^Results/,$w test.out
|
|
||||||
:qa!
|
|
||||||
ENDTEST
|
|
||||||
|
|
||||||
Results of test_qf_title:
|
|
@ -1,2 +0,0 @@
|
|||||||
Results of test_qf_title:
|
|
||||||
:setqflist()
|
|
@ -316,3 +316,53 @@ func Test_errortitle()
|
|||||||
augroup END
|
augroup END
|
||||||
augroup! QfBufWinEnter
|
augroup! QfBufWinEnter
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
function XqfTitleTests(cchar)
|
||||||
|
let Xgetexpr = a:cchar . 'getexpr'
|
||||||
|
if a:cchar == 'c'
|
||||||
|
let Xgetlist = 'getqflist()'
|
||||||
|
else
|
||||||
|
let Xgetlist = 'getloclist(0)'
|
||||||
|
endif
|
||||||
|
let Xopen = a:cchar . 'open'
|
||||||
|
let Xclose = a:cchar . 'close'
|
||||||
|
|
||||||
|
exe Xgetexpr . " ['file:1:1:message']"
|
||||||
|
exe 'let l = ' . Xgetlist
|
||||||
|
if a:cchar == 'c'
|
||||||
|
call setqflist(l, 'r')
|
||||||
|
else
|
||||||
|
call setloclist(0, l, 'r')
|
||||||
|
endif
|
||||||
|
|
||||||
|
exe Xopen
|
||||||
|
if a:cchar == 'c'
|
||||||
|
let title = ':setqflist()'
|
||||||
|
else
|
||||||
|
let title = ':setloclist()'
|
||||||
|
endif
|
||||||
|
call assert_equal(title, w:quickfix_title)
|
||||||
|
exe Xclose
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Tests for quickfix window's title
|
||||||
|
function Test_qf_title()
|
||||||
|
call XqfTitleTests('c')
|
||||||
|
call XqfTitleTests('l')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Tests for 'errorformat'
|
||||||
|
function Test_efm()
|
||||||
|
let save_efm = &efm
|
||||||
|
set efm=%EEEE%m,%WWWW%m,%+CCCC%.%#,%-GGGG%.%#
|
||||||
|
cgetexpr ['WWWW', 'EEEE', 'CCCC']
|
||||||
|
let l = strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
|
||||||
|
call assert_equal("[['W', 1], ['E^@CCCC', 1]]", l)
|
||||||
|
cgetexpr ['WWWW', 'GGGG', 'EEEE', 'CCCC']
|
||||||
|
let l = strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
|
||||||
|
call assert_equal("[['W', 1], ['E^@CCCC', 1]]", l)
|
||||||
|
cgetexpr ['WWWW', 'GGGG', 'ZZZZ', 'EEEE', 'CCCC', 'YYYY']
|
||||||
|
let l = strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
|
||||||
|
call assert_equal("[['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]]", l)
|
||||||
|
let &efm = save_efm
|
||||||
|
endfunction
|
||||||
|
@ -743,6 +743,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1569,
|
||||||
/**/
|
/**/
|
||||||
1568,
|
1568,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user