]> granicus.if.org Git - vim/commitdiff
patch 8.2.1410: adding compiler plugin requires test change v8.2.1410
authorBram Moolenaar <Bram@vim.org>
Sun, 9 Aug 2020 18:05:41 +0000 (20:05 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 9 Aug 2020 18:05:41 +0000 (20:05 +0200)
Problem:    Adding compiler plugin requires test change.
Solution:   Include compiler plugin and adjust test.

runtime/compiler/xo.vim [new file with mode: 0644]
src/testdir/test_compiler.vim
src/version.c

diff --git a/runtime/compiler/xo.vim b/runtime/compiler/xo.vim
new file mode 100644 (file)
index 0000000..525657d
--- /dev/null
@@ -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
index 464dd9bcb5a6243f4c19f659675d5c7be9405a01..dd753c55ba0b5b64ce0923d6696c111dc32bba36 100644 (file)
@@ -46,7 +46,7 @@ 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
 
 " Test executing :compiler from the command line, not from a script
@@ -60,7 +60,7 @@ 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', @:)
index 0cd89d67a23044b15d3fe222f6540d2c1e7587e9..e290ea29cae8aa315b311f2cd72d31b09ba66515 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1410,
 /**/
     1409,
 /**/