errorformat for vim tests

12 views
Skip to first unread message

Ben Jackson

unread,
Jun 1, 2019, 11:17:38 AM6/1/19
to vim_dev
Might be a strange question, but does anyone have a good errorformat setting for running vim's tests?

When editing tests, I use a mapping to run the test and populate the quick fix list with any tests failures. Ultimately, I have a compiler plugin, but it really just:

setlocal errorformat=Found\ Errors\ in\ %m,Caught\ exception\ in\ %m
:make -C %:h -B %:t:r

However, I haven't found a satisfactory way to extract the failures from this command and populate the quick fix list, and make return nonzero exit code if there are errors, so it's tricky to know when there were errors (as the actual :make is run in the background via a job).

I use run_test.vim in vimspector and changed it to at least include the filename in the output, and that sort-of works, but does anyone who frequently develops vim have a good errorformat, or other hints for this sort of workflow? Or perhaps, does anyone else use a similar workflow successfully?

Ideally, failures could include the exact file/line number when they are detected. Unfortunately, the context reported by vim when an exception is caught doesn't relate directly to the source line (line numbers are offsets from functions).

Any advice much appreciated.

Reply all
Reply to author
Forward
0 new messages