Patch 8.0.0473
Problem: No test covering arg_all().
Solution: Add a test expanding ##.
Files: src/testdir/test_arglist.vim
*** ../vim-8.0.0472/src/testdir/test_arglist.vim 2017-03-09
15:58:26.548668478 +0100
--- src/testdir/test_arglist.vim 2017-03-16 22:52:19.640901511 +0100
***************
*** 90,96 ****
" Test for [count]argument and [count]argdelete commands
" Ported from the test_argument_count.in test script
! function Test_argument()
" Clean the argument list
arga a | %argd
--- 90,96 ----
" Test for [count]argument and [count]argdelete commands
" Ported from the test_argument_count.in test script
! func Test_argument()
" Clean the argument list
arga a | %argd
***************
*** 162,172 ****
%argdelete
call assert_fails('argument', 'E163:')
! endfunction
" Test for 0argadd and 0argedit
" Ported from the test_argument_0count.in test script
! function Test_zero_argadd()
" Clean the argument list
arga a | %argd
--- 162,172 ----
%argdelete
call assert_fails('argument', 'E163:')
! endfunc
" Test for 0argadd and 0argedit
" Ported from the test_argument_0count.in test script
! func Test_zero_argadd()
" Clean the argument list
arga a | %argd
***************
*** 188,209 ****
2argu
arga third
call assert_equal(['edited', 'a', 'third', 'b', 'c', 'd'], argv())
! endfunction
! function Reset_arglist()
args a | %argd
! endfunction
" Test for argc()
! function Test_argc()
call Reset_arglist()
call assert_equal(0, argc())
argadd a b
call assert_equal(2, argc())
! endfunction
" Test for arglistid()
! function Test_arglistid()
call Reset_arglist()
arga a b
call assert_equal(0, arglistid())
--- 188,209 ----
2argu
arga third
call assert_equal(['edited', 'a', 'third', 'b', 'c', 'd'], argv())
! endfunc
! func Reset_arglist()
args a | %argd
! endfunc
" Test for argc()
! func Test_argc()
call Reset_arglist()
call assert_equal(0, argc())
argadd a b
call assert_equal(2, argc())
! endfunc
" Test for arglistid()
! func Test_arglistid()
call Reset_arglist()
arga a b
call assert_equal(0, arglistid())
***************
*** 218,236 ****
tabonly | only | enew!
argglobal
call assert_equal(0, arglistid())
! endfunction
" Test for argv()
! function Test_argv()
call Reset_arglist()
call assert_equal([], argv())
call assert_equal("", argv(2))
argadd a b c d
call assert_equal('c', argv(2))
! endfunction
" Test for the :argedit command
! function Test_argedit()
call Reset_arglist()
argedit a
call assert_equal(['a'], argv())
--- 218,236 ----
tabonly | only | enew!
argglobal
call assert_equal(0, arglistid())
! endfunc
" Test for argv()
! func Test_argv()
call Reset_arglist()
call assert_equal([], argv())
call assert_equal("", argv(2))
argadd a b c d
call assert_equal('c', argv(2))
! endfunc
" Test for the :argedit command
! func Test_argedit()
call Reset_arglist()
argedit a
call assert_equal(['a'], argv())
***************
*** 254,263 ****
argedit! y
call assert_equal(['x', 'y', 'a', 'c', 'b'], argv())
%argd
! endfunction
" Test for the :argdelete command
! function Test_argdelete()
call Reset_arglist()
args aa a aaa b bb
argdelete a*
--- 254,263 ----
argedit! y
call assert_equal(['x', 'y', 'a', 'c', 'b'], argv())
%argd
! endfunc
" Test for the :argdelete command
! func Test_argdelete()
call Reset_arglist()
args aa a aaa b bb
argdelete a*
***************
*** 269,278 ****
call assert_fails('argdelete', 'E471:')
call assert_fails('1,100argdelete', 'E16:')
%argd
! endfunction
" Tests for the :next, :prev, :first, :last, :rewind commands
! function Test_argpos()
call Reset_arglist()
args a b c d
last
--- 269,278 ----
call assert_fails('argdelete', 'E471:')
call assert_fails('1,100argdelete', 'E16:')
%argd
! endfunc
" Tests for the :next, :prev, :first, :last, :rewind commands
! func Test_argpos()
call Reset_arglist()
args a b c d
last
***************
*** 290,299 ****
rewind
call assert_equal(0, argidx())
%argd
! endfunction
" Test for autocommand that redefines the argument list, when doing ":all".
! function Test_arglist_autocmd()
autocmd BufReadPost Xxx2 next Xxx2 Xxx1
call writefile(['test file Xxx1'], 'Xxx1')
call writefile(['test file Xxx2'], 'Xxx2')
--- 290,299 ----
rewind
call assert_equal(0, argidx())
%argd
! endfunc
" Test for autocommand that redefines the argument list, when doing ":all".
! func Test_arglist_autocmd()
autocmd BufReadPost Xxx2 next Xxx2 Xxx1
call writefile(['test file Xxx1'], 'Xxx1')
call writefile(['test file Xxx2'], 'Xxx2')
***************
*** 319,322 ****
call delete('Xxx3')
argdelete Xxx*
bwipe! Xxx1 Xxx2 Xxx3
! endfunction
--- 319,329 ----
call delete('Xxx3')
argdelete Xxx*
bwipe! Xxx1 Xxx2 Xxx3
! endfunc
!
! func Test_arg_all_expand()
! call writefile(['test file Xxx1'], 'Xx x')
! next notexist Xx\ x runtest.vim
! call assert_equal('notexist Xx\ x runtest.vim', expand('##'))
! call delete('Xx x')
! endfunc
*** ../vim-8.0.0472/src/version.c 2017-03-16 22:37:55.995201853 +0100
--- src/version.c 2017-03-16 22:51:08.545427501 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 473,
/**/
--
hundred-and-one symptoms of being an internet addict:
139. You down your lunch in five minutes, at your desk, so you can
spend the rest of the hour surfing the Net.
/// 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.