[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode
From: |
Randy Taylor |
Subject: |
bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode |
Date: |
Wed, 15 May 2024 02:36:15 +0000 |
On Tuesday, May 14th, 2024 at 10:04, Ankit Gadiya via "Bug reports for GNU
Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> wrote:
> Hello folks,
>
> This patch adds two new commands for go-ts-mode to run unit test cases.
>
> The go-ts-mode-test-package command can run all the tests under the package of
> the current buffer. I've tested it to work with both Go module packages and
> non-module packages. This command is bound to C-c C-p in the go-ts-mode-map.
>
> The go-ts-mode-test-function-at-point command runs the current test function.
> If
> region is active then it runs all the test functions under the region. I'm
> attaching a sample_test.go file as well for reviewers to test the patch. This
> command is bound to C-c C-t in the go-ts-mode-map.
>
> --
> Ankit
Thanks for working on this, it would certainly be a nice addition.
This is going to need a commit log entry. See the "Commit messages" section
in the CONTRIBUTING file.
I'm undecided on the keybinds. I think I would prefer something like:
C-c t p
or
C-c C-t p
so we can keep test-related things together.
I haven't tried this out yet, but here are some comments (mostly nits)
after a quick look:
In NEWS, sentences should be separated by 2 spaces.
+The 'go-ts-mode-test-function-at-point' command runs unit test at
^the
+point.
+This function respects `go-build-tags' buffer-local variable
^the
+ "Compiles the tests matching REGEXP.
^Compile
+If the point is anywhere in the test function, that function will be
+tested.
^ run (keeps it consistent with the next sentence)
+ "Run all the unit tests under current package."
^the
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Ankit Gadiya, 2024/05/14
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Eli Zaretskii, 2024/05/14
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode,
Randy Taylor <=
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Ankit Gadiya, 2024/05/15
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Randy Taylor, 2024/05/15
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Eli Zaretskii, 2024/05/16
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Ankit Gadiya, 2024/05/16
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Eli Zaretskii, 2024/05/16
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Ankit Gadiya, 2024/05/18
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Randy Taylor, 2024/05/24
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Randy Taylor, 2024/05/27
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Ankit Gadiya, 2024/05/28
- bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode, Randy Taylor, 2024/05/16