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

fix: escaping of []{} brackets were missing #64

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

fredrikaverpil
Copy link
Owner

@fredrikaverpil fredrikaverpil commented Jun 28, 2024

Why?

Having a test like this would result it not being run, and skipped by neotest-golang as the output would include "no tests to run":

package main

import "testing"

// A dummy test, just to assert that Go tests can run.
func TestNames(t *testing.T) {
	t.Run("Brackets [1] (2) {3} are ok", func(t *testing.T) {
		if Add(1, 2) != 3 {
			t.Fail()
		}
	})
}
=== RUN   TestNames
--- PASS: TestNames (0.00s)
testing: warning: no tests to run
PASS
coverage: 0.0% of statements
ok      github.com/fredrikaverpil/neotest-golang        1.425s  coverage: 0.0% of statements [no tests to run]

What?

Escape the brackets. Now the test runs fine.

@fredrikaverpil fredrikaverpil self-assigned this Jun 28, 2024
@fredrikaverpil fredrikaverpil force-pushed the fix/escaping-of-test-name branch from 2345051 to 9a4db0e Compare June 28, 2024 19:07
@fredrikaverpil fredrikaverpil force-pushed the fix/escaping-of-test-name branch from 9a4db0e to 6f366c8 Compare June 28, 2024 20:29
@fredrikaverpil fredrikaverpil merged commit 2dcc9e9 into main Jun 28, 2024
8 checks passed
@fredrikaverpil fredrikaverpil deleted the fix/escaping-of-test-name branch June 28, 2024 20:41
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.

1 participant