mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-02-18 11:54:40 +01:00
Add CheckNotMacVim command for tests
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user