You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attached two screenshots. One shows how go test renders in a terminal, and the other when using :GoTest within vim. I'm using testify mostly for assert functionality.
I chatted with fatih a bit in #go-nuts, and it was said that vim-go has pretty basic support for multilines. Now, since this is surely the result of me using another library, this might not be worthy of an issue here. I'll just risk it being closed. :)
The text was updated successfully, but these errors were encountered:
There needs be a either a separate plugin or testify needs a testing compatible output so vim-go can parse it. I would say it's not the work worth to implement, there are many other testing packages too, I don't want to spend time on these. But you can just add yourself another command like :GoTestify which would parse that output.
I know its not ideal or desirable at all, but I worked around this by modifying the go#tool#ShowErrors() function in vim-go/autoload/go/tool.vim.
I just replaced the let tokens = matchlist(... line near the top of the function with the following block:
let testify_tokens = matchlist(line, '^.*Location:\s*\(.\{-}\):\(\d\+\)\(.*\)')
if !empty(testify_tokens)
let tokens = testify_tokens
else
let tokens = matchlist(line, '^\s*\(.\{-}\):\(\d\+\):\s*\(.*\)')
endif
I haven't thoroughly tested, but it appears to work for both testify-based tests, and regular Go tests. However, YMMV.
I attached two screenshots. One shows how
go test
renders in a terminal, and the other when using:GoTest
within vim. I'm using testify mostly for assert functionality.I chatted with fatih a bit in #go-nuts, and it was said that vim-go has pretty basic support for multilines. Now, since this is surely the result of me using another library, this might not be worthy of an issue here. I'll just risk it being closed. :)
The text was updated successfully, but these errors were encountered: