Add CheckNotMacVim command for tests

This commit is contained in:
ichizok
2022-04-07 04:01:09 +09:00
parent 09b3b4c407
commit 3274477347
4 changed files with 13 additions and 5 deletions

View File

@@ -111,6 +111,14 @@ func CheckNotBSD()
endif
endfunc
" Command to check for not running on a MacVim.
command CheckNotMacVim call CheckNotMacVim()
func CheckNotMacVim()
if has('gui_macvim')
throw 'Skipped: does not work on MacVim'
endif
endfunc
" Command to check that making screendumps is supported.
" Caller must source screendump.vim
command CheckScreendump call CheckScreendump()

View File

@@ -9,10 +9,10 @@ endif
CheckFeature clientserver
if has('gui_macvim') && !has('gui_running')
if has('gui_macvim')
" MacVim currently doesn't support client_server for non-gui.
" See https://github.com/macvim-dev/macvim/issues/657
finish
CheckGui
endif
source shared.vim

View File

@@ -1209,8 +1209,8 @@ endfunc
func Test_edit_MOUSE()
" This is a simple test, since we not really using the mouse here
if (has("gui_macvim") && has("gui_running"))
return
if has("gui_macvim")
CheckNotGui
endif
CheckFeature mouse
10new

View File

@@ -839,7 +839,7 @@ func Test_v_argv()
let out = system(GetVimCommand() . ' -es -V1 -X arg1 --cmd "echo v:argv" --cmd q')
let list = out->split("', '")
if !has('gui_macvim') " MacVim doesn't always use 'vim' as the executable as it could be 'Vim'
call assert_match('vim', list[0])
call assert_match('vim', list[0])
endif
let idx = index(list, 'arg1')
call assert_true(idx > 2)