I'm trying to write an errorformat
for JUnit. Directory structure from cwd
is:
unsw/piazza/PiazzaForum.java
unsw/piazza/Thread.java
unsw/test/PiazzaTest.java
Amongst all the cruft outputted by JUnit, relevant output lines looks like: unsw.test.PiazzaTest.testSearchByTag(PiazzaTest.java:50)
I capture this with let &errorformat = '%.%#unsw\.test%.%#(%f:%l)'
This expects PiazzaTest.java
to be in the cwd
when it is not.
How can I solve this?
&efm
which directory the file is in? I suspect you may be better served by having the output give you the path (I don't use JUnit so can't advise on how to do so).%D
and%X
to handle the package names as directories or post-process JUnit's output (externally w/ script or internally w/ QuickfixCmdPost, see:help QuickfixCmdPost-example
)