Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang test support #8

Merged
merged 1 commit into from
Apr 18, 2015
Merged

Golang test support #8

merged 1 commit into from
Apr 18, 2015

Conversation

vhakulinen
Copy link
Contributor

Doesn't work for scope file, but everything else is done. To make file scope work, cd to that file's directory is needed, and my vimlfu ain't that strong to do so.

function! neoterm#test#golang#run(scope)
let command = 'go test'

if a:scope == 'file'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know nothing about go-lang, but I guess you can just pass the file path to go test <file_path> and it should work. I saw this documentation.

You can see how to do this in viml looking the minitest lib.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go test runs test per package. There can be specified single test file but it needs everything that test need (imported packages) also specified.

http://stackoverflow.com/questions/16935965/how-to-run-test-cases-in-a-specified-file

kassio added a commit that referenced this pull request Apr 18, 2015
@kassio kassio merged commit e730e2a into kassio:master Apr 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants