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

test: add :GoTestFile #3486

Merged
merged 1 commit into from
Jan 14, 2023
Merged

test: add :GoTestFile #3486

merged 1 commit into from
Jan 14, 2023

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Jan 14, 2023

Add :GoTestFile command to run all tests in the current file.

Fix two bugs in :GoTestFunc.

  • Change the test name search pattern to ensure the line begins with "func Test" (e.g. stop matching "// func Test").
  • Ensure that names of tests that run match exactly by including a ^ in the pattern given to go test's -run flag (e.g. stop matching both TestFoo and TestBarTestFoo when the cursor is in TestFoo).

Closes #2138

Add :GoTestFile command to run all tests in the current file.

Fix two bugs in :GoTestFunc.
* Change the test name search pattern to ensure the line begins with
  "func Test" (e.g. stop matching "// func Test").
* Ensure that names of tests that run match exactly by including a ^ in
  the pattern given to go test's -run flag (e.g. stop matching both
  TestFoo and TestBarTestFoo when the cursor is in TestFoo).

Closes fatih#2138
@bhcleek bhcleek added this to the vim-go v1.29 milestone Jan 14, 2023
@bhcleek bhcleek merged commit ec76dca into fatih:master Jan 14, 2023
@bhcleek bhcleek deleted the test/file branch January 14, 2023 20:36
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.

wishlist: add support for a :GoTestFile command
1 participant