-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Labels
area:languages/goGo programming language supportGo programming language supportstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduceVerified steps to reproduce included and someone on the team managed to reproduce
Description
Summary
Cannot run go subtests that has bracket or parentheses in name
Description
For subtests in GO, if the name has brackets - [] OR parentheses - (), running the subtest from play button, the test results into testing: warning: no tests to run output
However if I run the actual test from play button, the test runs properly
Steps to reproduce:
- Create a subtest under a test with brackets in name. For example -
func TestInventoryCheckout(t *testing.T) {
t.Run("[Single] customer can checkout", func(t *testing.T) {
slog.Info(`💡 cart items left after checkout of customer A - `, slog.Any("orderItems", orderItems.Items))
})- Press play button beside of t.Run, then select
go test ......
Expected Behavior: Should run the test properly and show proper test output
Actual Behavior: Outputting testing: warning: no tests to run as below -

PS -
- My settings.json and keymap.json does not have any language related changes and I dont have any .editorconfig for this project.
- The same subtest works properly if debug. Here is a shot for that -
- Also pressing play button beside `func TestInventoryCheckout(t *testing.T) {` then selecting `go test .....` results into proper output as shown below -
Zed Version and System Specs
Zed: v0.211.6 (Zed)
OS: macOS 15.7.2
Memory: 18 GiB
Architecture: aarch64
If applicable, attach your Zed.log file to this issue.
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:languages/goGo programming language supportGo programming language supportstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduceVerified steps to reproduce included and someone on the team managed to reproduce