changeset 11173:cc94b80016fd v8.0.0473

patch 8.0.0473: no test covering arg_all() commit https://github.com/vim/vim/commit/8c34aa09a449a5c1c2d1141b6fafa90f29b3fc12 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 16 22:52:32 2017 +0100 patch 8.0.0473: no test covering arg_all() Problem: No test covering arg_all(). Solution: Add a test expanding ##.
author Christian Brabandt <cb@256bit.org>
date Thu, 16 Mar 2017 23:00:05 +0100
parents a7dee2aa07c4
children 1b3fe8c81a43
files src/testdir/test_arglist.vim src/version.c
diffstat 2 files changed, 29 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -90,7 +90,7 @@ endfunc
 
 " Test for [count]argument and [count]argdelete commands
 " Ported from the test_argument_count.in test script
-function Test_argument()
+func Test_argument()
   " Clean the argument list
   arga a | %argd
 
@@ -162,11 +162,11 @@ function Test_argument()
 
   %argdelete
   call assert_fails('argument', 'E163:')
-endfunction
+endfunc
 
 " Test for 0argadd and 0argedit
 " Ported from the test_argument_0count.in test script
-function Test_zero_argadd()
+func Test_zero_argadd()
   " Clean the argument list
   arga a | %argd
 
@@ -188,22 +188,22 @@ function Test_zero_argadd()
   2argu
   arga third
   call assert_equal(['edited', 'a', 'third', 'b', 'c', 'd'], argv())
-endfunction
+endfunc
 
-function Reset_arglist()
+func Reset_arglist()
   args a | %argd
-endfunction
+endfunc
 
 " Test for argc()
-function Test_argc()
+func Test_argc()
   call Reset_arglist()
   call assert_equal(0, argc())
   argadd a b
   call assert_equal(2, argc())
-endfunction
+endfunc
 
 " Test for arglistid()
-function Test_arglistid()
+func Test_arglistid()
   call Reset_arglist()
   arga a b
   call assert_equal(0, arglistid())
@@ -218,19 +218,19 @@ function Test_arglistid()
   tabonly | only | enew!
   argglobal
   call assert_equal(0, arglistid())
-endfunction
+endfunc
 
 " Test for argv()
-function Test_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))
-endfunction
+endfunc
 
 " Test for the :argedit command
-function Test_argedit()
+func Test_argedit()
   call Reset_arglist()
   argedit a
   call assert_equal(['a'], argv())
@@ -254,10 +254,10 @@ function Test_argedit()
   argedit! y
   call assert_equal(['x', 'y', 'a', 'c', 'b'], argv())
   %argd
-endfunction
+endfunc
 
 " Test for the :argdelete command
-function Test_argdelete()
+func Test_argdelete()
   call Reset_arglist()
   args aa a aaa b bb
   argdelete a*
@@ -269,10 +269,10 @@ function Test_argdelete()
   call assert_fails('argdelete', 'E471:')
   call assert_fails('1,100argdelete', 'E16:')
   %argd
-endfunction
+endfunc
 
 " Tests for the :next, :prev, :first, :last, :rewind commands
-function Test_argpos()
+func Test_argpos()
   call Reset_arglist()
   args a b c d
   last
@@ -290,10 +290,10 @@ function Test_argpos()
   rewind
   call assert_equal(0, argidx())
   %argd
-endfunction
+endfunc
 
 " Test for autocommand that redefines the argument list, when doing ":all".
-function Test_arglist_autocmd()
+func Test_arglist_autocmd()
   autocmd BufReadPost Xxx2 next Xxx2 Xxx1
   call writefile(['test file Xxx1'], 'Xxx1')
   call writefile(['test file Xxx2'], 'Xxx2')
@@ -319,4 +319,11 @@ function Test_arglist_autocmd()
   call delete('Xxx3')
   argdelete Xxx*
   bwipe! Xxx1 Xxx2 Xxx3
-endfunction
+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
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    473,
+/**/
     472,
 /**/
     471,