comparison src/testdir/test_startup.vim @ 24228:1e85e76f9e76 v8.2.2655

patch 8.2.2655: The -w command line argument doesn't work Commit: https://github.com/vim/vim/commit/0a1a6a1aa4004d0e4d64cc375540156b8bd92a87 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 26 14:14:18 2021 +0100 patch 8.2.2655: The -w command line argument doesn't work Problem: The -w command line argument doesn't work. Solution: Don't set 'window' when set with the -w argument. (closes https://github.com/vim/vim/issues/8011)
author Bram Moolenaar <Bram@vim.org>
date Fri, 26 Mar 2021 14:15:03 +0100
parents 493870e7f61d
children ed0fc4787392
comparison
equal deleted inserted replaced
24227:dc3e9b290b7e 24228:1e85e76f9e76
1043 1043
1044 " Test for the "-w scriptout" argument 1044 " Test for the "-w scriptout" argument
1045 func Test_w_arg() 1045 func Test_w_arg()
1046 " Can't catch the output of gvim. 1046 " Can't catch the output of gvim.
1047 CheckNotGui 1047 CheckNotGui
1048
1048 call writefile(["iVim Editor\<Esc>:q!\<CR>"], 'Xscriptin', 'b') 1049 call writefile(["iVim Editor\<Esc>:q!\<CR>"], 'Xscriptin', 'b')
1049 if RunVim([], [], '-s Xscriptin -w Xscriptout') 1050 if RunVim([], [], '-s Xscriptin -w Xscriptout')
1050 call assert_equal(["iVim Editor\e:q!\r"], readfile('Xscriptout')) 1051 call assert_equal(["iVim Editor\e:q!\r"], readfile('Xscriptout'))
1051 call delete('Xscriptout') 1052 call delete('Xscriptout')
1052 endif 1053 endif
1058 call mkdir("Xdir") 1059 call mkdir("Xdir")
1059 let m = system(GetVimCommand() .. " -w Xdir") 1060 let m = system(GetVimCommand() .. " -w Xdir")
1060 call assert_equal("Cannot open for script output: \"Xdir\"\n", m) 1061 call assert_equal("Cannot open for script output: \"Xdir\"\n", m)
1061 call delete("Xdir", 'rf') 1062 call delete("Xdir", 'rf')
1062 endif 1063 endif
1064
1065 " A number argument sets the 'window' option
1066 call writefile(["iwindow \<C-R>=&window\<CR>\<Esc>:wq! Xresult\<CR>"], 'Xscriptin', 'b')
1067 if RunVim([], [], '-s Xscriptin -w 17')
1068 call assert_equal(["window 17"], readfile('Xresult'))
1069 call delete('Xresult')
1070 endif
1071 call delete('Xscriptin')
1063 endfunc 1072 endfunc
1064 1073
1065 " Test for the "-s scriptin" argument 1074 " Test for the "-s scriptin" argument
1066 func Test_s_arg() 1075 func Test_s_arg()
1067 " Can't catch the output of gvim. 1076 " Can't catch the output of gvim.