I have my own build system for perl test files, and it works just fine except when capturing input. If I have an open file called, e.g., ~/projects/something.pm
, on error the output of the build system will be something like Failed test at /home/username/projects/something.pm line 66
.
The regex for capturing works fine, the problem is that sublime thinks that the two files are in different paths, so it opens a new tab, and I just want the open file to be brought up front.
Is there any setting to make this "match"?
EDIT: My .sublime-build file is generated every time I run the build, to support the fact that I may want to run a single test instead of all the file. I have my own plugin that detects which test I'm using the cursor position and appends that to the command line. It makes no difference though, since the behaviour is always the same, even with a "standard" build. The contents of the .sublime-build file are like this:
{
"shell_cmd" : "prove $file_path/$file_name" ,
"working_dir" : "/home/username/projects/",
"file_regex": " at (.*.pm) line ([0-9]*)",
}
I've tried replacing /home/username
with the ~
character, but for some reason this breaks the build system, and when building I just get a black output panel, with the status bar saying "Building...".
I've found the real problem with a workaround anyway, posted that as an answer.