Patch 7.4.1569
Problem: Using old style tests for quickfix.
Solution: Change them to new style tests. (Yegappan Lakshmanan)
Files: src/testdir/Make_all.mak, src/testdir/test106.in,
src/testdir/test106.ok, src/testdir/test_qf_title.in,
src/testdir/test_qf_title.ok, src/testdir/test_quickfix.vim
*** ../vim-7.4.1568/src/testdir/Make_all.mak 2016-03-13 18:06:59.528803729
+0100
--- src/testdir/Make_all.mak 2016-03-15 14:05:34.421368836 +0100
***************
*** 87,93 ****
test103.out \
test104.out \
test105.out \
- test106.out \
test107.out \
test108.out \
test_autocmd_option.out \
--- 87,92 ----
***************
*** 110,116 ****
test_match_conceal.out \
test_nested_function.out \
test_options.out \
- test_qf_title.out \
test_ruby.out \
test_search_mbyte.out \
test_signs.out \
--- 109,114 ----
*** ../vim-7.4.1568/src/testdir/test106.in 2014-03-12 19:41:37.100948866
+0100
--- src/testdir/test106.in 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,16 ****
- 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:
--- 0 ----
*** ../vim-7.4.1568/src/testdir/test106.ok 2014-03-12 19:41:37.100948866
+0100
--- src/testdir/test106.ok 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,4 ****
- Results of test106:
- [['W', 1], ['E^@CCCC', 1]]
- [['W', 1], ['E^@CCCC', 1]]
- [['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]]
--- 0 ----
*** ../vim-7.4.1568/src/testdir/test_qf_title.in 2014-07-23
15:54:43.443903036 +0200
--- src/testdir/test_qf_title.in 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,18 ****
- 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:
--- 0 ----
*** ../vim-7.4.1568/src/testdir/test_qf_title.ok 2014-07-23
15:54:43.443903036 +0200
--- src/testdir/test_qf_title.ok 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,2 ****
- Results of test_qf_title:
- :setqflist()
--- 0 ----
*** ../vim-7.4.1568/src/testdir/test_quickfix.vim 2016-01-22
22:44:06.373407684 +0100
--- src/testdir/test_quickfix.vim 2016-03-15 14:05:34.421368836 +0100
***************
*** 316,318 ****
--- 316,368 ----
augroup END
augroup! QfBufWinEnter
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
*** ../vim-7.4.1568/src/version.c 2016-03-15 13:44:07.938807343 +0100
--- src/version.c 2016-03-15 14:06:40.136682392 +0100
***************
*** 745,746 ****
--- 745,748 ----
{ /* Add new patch number below this line */
+ /**/
+ 1569,
/**/
--
The future isn't what it used to be.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.