Open abourget opened 8 years ago
I have something akin to the cursor one living in my dotfiles. It uses C-M-x
to run the test which point is currently inside. Once that's executed, it stores it so that you can use C-M-x
in your non-test files and it will execute that same test again. Simplistic, but works well!
Maybe a cleaned up version of that could be the base of something like this?
IIRC rats has this feature. I'll leave this issue open until I decide whether I want these features in go-mode itself or not, but until then I recommend looking into rats.
Woah cool.. I guess rats is exactly what I wanted. Thanks a whole lot.
Le mar. 6 sept. 2016 06:51, Dominik Honnef notifications@github.com a écrit :
IIRC rats https://github.com/ane/rats.el has this feature. I'll leave this issue open until I decide whether I want these features in go-mode itself or not, but until then I recommend looking into rats.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dominikh/go-mode.el/issues/148#issuecomment-244915688, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFs8OWHaYnlxbxX9Z5tJYK7dIRaHSmoks5qnUWigaJpZM4J0cjj .
https://github.com/nlamirault/gotest.el has the same feature as well.
I checked how VisualStudio Code did Go integration and was surprised to find a pretty good integration there. It has those options in the palette:
Go: Test (cursor)
- which takes thefunc Test*
at hand and passes it togo test -run
Go: Test (file)
which only tests the current file.Go: Test (package)
tests the whole packageGo: Test coverage in curent package
- would run tests with a coverage report.It would be so great to have something similar, especially the
Test (cursor)
run.. that would speed up things a log when writing tests.thanks a whole bunch for this mode :)