Add minimal scala support#312
Conversation
codeinabox
left a comment
There was a problem hiding this comment.
Thank you for this. Would it possible to add a spec and fixture to test the implementation. Also could you update README amd doc/test.txt
There was a problem hiding this comment.
Looks good to me, thank you so much!
I left two small comments, and after they are addressed along and changes that @codeinabox requested, this should be ready to merge.
There was a problem hiding this comment.
I think it would make more sense to have this named SbtTest.
| @@ -0,0 +1,39 @@ | |||
| if !exists('g:test#scala#sbttest#file_pattern') | |||
| let g:test#scala#sbttest#file_pattern = '\v^.*.scala$' | |||
There was a problem hiding this comment.
Is it possible to make the test file regex match test files but not application files, e.g. \vsrc/test/scala/.*\.scala$? That helps make test.vim smarter, e.g. if you run tests on an application file, it would detect that it's not a test file and run tests for the last test file instead.
There was a problem hiding this comment.
Good point, but I looked at our codebase at work, and it looks like it is overwhelmingly common for people to include "Test", "Suite", or both in the filename. I will work on an improved regex; so far, I created a fixture for scala, will create a spec and extend README tomorrow.
868d037 to
66403b6
Compare
|
Ok, Travis is finally happy:) I guess it's good for now. |

Hey janko-m,
First of all, thank you for the brilliant work, I am a huge fan, and use vim-test regularly to test my python, ruby and java!
Should you choose to include my contribution for scala testing through sbt, it would be my greatest pleasure.
I tested the solution, and it works fine for me, but as scala imposes way less formatting restrictions compared to java tests for instance, it is hard to create a file pattern regex to match all possible cases. If (when) I find a better one, I will definitely let you know.
Also, I am mostly using maven as scala is a mixin, rather than my primary tool. I will cut some time in the future to attach maven test to scala as well.
Thank you once again,
with my best wishes,
Alex T