comparison src/testdir/test_startup.vim @ 24230:ed0fc4787392 v8.2.2656

patch 8.2.2656: some command line arguments and regexp errors not tested Commit: https://github.com/vim/vim/commit/a2b3e7dc9201fb3d8782c6b4ab53862160e254da Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 26 17:24:34 2021 +0100 patch 8.2.2656: some command line arguments and regexp errors not tested Problem: Some command line arguments and regexp errors not tested. Solution: Add a few test cases. (Dominique Pell?, closes https://github.com/vim/vim/issues/8013)
author Bram Moolenaar <Bram@vim.org>
date Fri, 26 Mar 2021 17:30:03 +0100
parents 1e85e76f9e76
children d3cabf12c991
comparison
equal deleted inserted replaced
24229:4d37f1051de6 24230:ed0fc4787392
858 \ "second\tXfile1\t/^ \\zssecond$/", 858 \ "second\tXfile1\t/^ \\zssecond$/",
859 \ "third\tXfile1\t/^ \\zsthird$/"], 859 \ "third\tXfile1\t/^ \\zsthird$/"],
860 \ 'Xtags') 860 \ 'Xtags')
861 call writefile([' first', ' second', ' third'], 'Xfile1') 861 call writefile([' first', ' second', ' third'], 'Xfile1')
862 862
863 if RunVim(before, after, '-t second') 863 for t_arg in ['-t second', '-tsecond']
864 call assert_equal(['Xfile1:L2C5'], readfile('Xtestout')) 864 if RunVim(before, after, '-t second')
865 call delete('Xtestout') 865 call assert_equal(['Xfile1:L2C5'], readfile('Xtestout'), t_arg)
866 endif 866 call delete('Xtestout')
867 endif
868 endfor
867 869
868 call delete('Xtags') 870 call delete('Xtags')
869 call delete('Xfile1') 871 call delete('Xfile1')
870 endfunc 872 endfunc
871 873
1062 call delete("Xdir", 'rf') 1064 call delete("Xdir", 'rf')
1063 endif 1065 endif
1064 1066
1065 " A number argument sets the 'window' option 1067 " A number argument sets the 'window' option
1066 call writefile(["iwindow \<C-R>=&window\<CR>\<Esc>:wq! Xresult\<CR>"], 'Xscriptin', 'b') 1068 call writefile(["iwindow \<C-R>=&window\<CR>\<Esc>:wq! Xresult\<CR>"], 'Xscriptin', 'b')
1067 if RunVim([], [], '-s Xscriptin -w 17') 1069 for w_arg in ['-w 17', '-w17']
1068 call assert_equal(["window 17"], readfile('Xresult')) 1070 if RunVim([], [], '-s Xscriptin ' .. w_arg)
1069 call delete('Xresult') 1071 call assert_equal(["window 17"], readfile('Xresult'), w_arg)
1070 endif 1072 call delete('Xresult')
1073 endif
1074 endfor
1071 call delete('Xscriptin') 1075 call delete('Xscriptin')
1072 endfunc 1076 endfunc
1073 1077
1074 " Test for the "-s scriptin" argument 1078 " Test for the "-s scriptin" argument
1075 func Test_s_arg() 1079 func Test_s_arg()