Skip to content

Instantly share code, notes, and snippets.

@bobpace
Created March 28, 2015 04:45
Show Gist options
  • Save bobpace/36235993d87a4f91b812 to your computer and use it in GitHub Desktop.
Save bobpace/36235993d87a4f91b812 to your computer and use it in GitHub Desktop.
Using NUnit Console Runner on mono, vim errorformat was not showing matches. This was my way around it.
function! OmniSharp#RunTests(mode) abort
wall
python buildcommand()
if a:mode !=# 'last'
python getTestCommand()
endif
let s:cmdheight=&cmdheight
set cmdheight=5
let b:dispatch = b:buildcommand . ' && ' . s:testcommand
if executable('sed')
" don't match on <filename unknown>:0
" convert nunit console runner output to same format as used from xbuild
let b:dispatch .= ' | sed -e "s/:0//" -e "s/.*at \(.*\) in \(.*\):\([[:digit:]]\+\)/\2(\3,0): \1/"'
endif
let &l:makeprg=b:dispatch
"errorformat=msbuild,nunit stack trace
setlocal errorformat=\ %#%f(%l\\\,%c):\ %m
Make
let &cmdheight = s:cmdheight
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment