Fix Test_v_argv test failure

This is an odd test failure as the test expects the binary name to be
'vim' while MacVim uses a capitalized version 'Vim'.
This commit is contained in:
Yee Cheng Chin
2019-10-30 04:08:11 -07:00
parent 4f32ce3f7b
commit 047b3e2a02
+3 -1
View File
@@ -678,7 +678,9 @@ func Test_v_argv()
let out = system(GetVimCommand() . ' -es -V1 -X arg1 --cmd "echo v:argv" --cmd q')
let list = out->split("', '")
call assert_match('vim', list[0])
if !has('gui_macvim') " MacVim doesn't always use 'vim' as the executable as it could be 'Vim'
call assert_match('vim', list[0])
endif
let idx = index(list, 'arg1')
call assert_true(idx > 2)
call assert_equal(['arg1', '--cmd', 'echo v:argv', '--cmd', 'q'']'], list[idx:])