Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ane/rats.el
Manage Go tests inside Emacs
https://github.com/ane/rats.el
emacs golang testing-tools
Last synced: 3 months ago
JSON representation
Manage Go tests inside Emacs
- Host: GitHub
- URL: https://github.com/ane/rats.el
- Owner: ane
- License: gpl-3.0
- Created: 2016-03-03T08:47:14.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-18T10:13:28.000Z (over 7 years ago)
- Last Synced: 2024-08-05T06:06:12.912Z (6 months ago)
- Topics: emacs, golang, testing-tools
- Language: Emacs Lisp
- Size: 33.2 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rats.el
[![MELPA](http://melpa.org/packages/rats-badge.svg)](http://melpa.org/#/rats) [![MELPA Stable](http://stable.melpa.org/packages/rats-badge.svg)](http://stable.melpa.org/#/rats)Rats lets you run Go tests inside emacs, so that you don't need to keep a shell open and run `go
test` yourself. You can either choose to run a single test or multiple, and the results will be
displayed in the echo area.## Installation
Using the Emacs package manager, make sure that you have [MELPA](http://melpa.org) or MELPA stable
in the package sources. For information on how to get MELPA in your package sources, please see
[here](http://melpa.org/#/getting-started).Once you have installed `rats`, add this to your initialization script:
``` emacs-lisp
(add-hook go-mode-hook #'rats-mode)
```Once `go-mode` activates again, you can now access Rats from the menu, or run commands interactively
(see [Usage](#usage)).## Usage
If you're in a test file and inside a test, you can use `rats-run-test-under-point` to run that
test. If you're editing a file inside a directory that has tests, `rats-run-tests-for-package` and
it will run all the tests in the directory.If you want to run a specific test, use `rats-run-test-in-current-buffer` to run a test from the
current buffer. This will list all the tests in the current buffer and let you pick one. The same
can be done for the whole package with `rats-run-test-from-package`.To view the test report buffer, you can run `rats-show-test-buffer`.
## Bindings
| Binding | Description |
|----------------------|---------------------------------------|
| C-c C-t t | Run test under point. |
| C-c C-t a | Run all tests in the current package. |
| C-c C-t c | Choose and run a test from the current buffer, with completion support. |
| C-c C-t p | Choose and run a test from the current package, with completion support. |
| C-c C-t b | Show the test report buffer. |