mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
vim-patch:8.2.1410: adding compiler plugin requires test change
Problem: Adding compiler plugin requires test change.
Solution: Include compiler plugin and adjust test.
7f7a888869
This commit is contained in:
parent
5e95e0da44
commit
ab85f774a6
26
runtime/compiler/xo.vim
Normal file
26
runtime/compiler/xo.vim
Normal file
@ -0,0 +1,26 @@
|
||||
" Vim compiler file
|
||||
" Compiler: XO
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Jul 10
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "xo"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=npx\ xo\ --reporter\ compact
|
||||
|
||||
CompilerSet makeprg=xo\ --reporter\ compact
|
||||
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ %m,
|
||||
\%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ %m,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
@ -42,12 +42,12 @@ func Test_compiler_without_arg()
|
||||
let a = split(execute('compiler'))
|
||||
call assert_match(runtime .. '/compiler/ant.vim$', a[0])
|
||||
call assert_match(runtime .. '/compiler/bcc.vim$', a[1])
|
||||
call assert_match(runtime .. '/compiler/xmlwf.vim$', a[-1])
|
||||
call assert_match(runtime .. '/compiler/xo.vim$', a[-1])
|
||||
endfunc
|
||||
|
||||
func Test_compiler_completion()
|
||||
call feedkeys(":compiler \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_match('^"compiler ant bcc .* xmlwf$', @:)
|
||||
call assert_match('^"compiler ant bcc .* xmlwf xo$', @:)
|
||||
|
||||
call feedkeys(":compiler p\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"compiler pbx perl php pylint pyunit', @:)
|
||||
|
Loading…
Reference in New Issue
Block a user