{{ message }}
Add support for swift test#205
Merged
Merged
Conversation
Contributor
Author
codeinabox
requested changes
Jul 30, 2017
codeinabox
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for the PR. Could you also please update the README and doc/test.txt
| endfunction | ||
|
|
||
| function! s:parse_nearest_test_info(position) | ||
| let l:info = g:test#base#nearest_test(a:position, g:test#swift#patterns) |
Collaborator
There was a problem hiding this comment.
I think you need to put this instead judging by the error
let l:info = test#base#nearest_test(a:position, g:test#swift#patterns)
Contributor
Author
|
Fixed CI and added Swift support to the README. I didn't see anywhere obvious to update |
Collaborator
|
For doc/test.txt it's just a case of adding something like this amongst all the runner commands |
Swift Package Manager ships a test runner that is accessible via `swift test`. This commit adds support for working with `swift test` via vim-test. There's definitely some fragility in here still that might need to get worked out over time. Off the top of my head, some potential issues: - Users might locate their tests in a directory named something other than "Tests". Doing so would break the test file detection (and the module name parsing). - If users use a test lib like Quick, this won't properly parse module info (and filtering Quick tests with swift test doesn't work at all). That being said, I think this is a good start, and getting this into the plugin would mean being able to deploy fixes for these issues by tweaking the regexes instead of needing to write this whole thing from scratch.
Contributor
Author
|
Ah! My bad. Added that there now. I don't know why I didn't see that section. |
codeinabox
approved these changes
Jul 31, 2017
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Swift Package Manager ships a test runner that is accessible via
swift test.This commit adds support for working with
swift testvia vim-test.There's definitely some fragility in here still that might need to get worked
out over time. Off the top of my head, some potential issues:
"Tests". Doing so would break the test file detection (and the module name
parsing).
(and filtering Quick tests with swift test doesn't work at all).
That being said, I think this is a good start, and getting this into the
plugin would mean being able to deploy fixes for these issues by tweaking the
regexes instead of needing to write this whole thing from scratch.