We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
fstest.TestFS generates a glob pattern (testfs.go#L294), but generates an incorrect one when the directory contains a minus.
fstest.TestFS
go version
$ go version go version go1.16 darwin/amd64
Yes.
func TestFS(t *testing.T) { fsys := fstest.MapFS{ "a-b/a": &fstest.MapFile{}, } if err := fstest.TestFS(fsys, "a-b/a"); err != nil { t.Error(err) } }
go test ./...
ok github.com/foo/bar 4.953s
go test ./... --- FAIL: TestFS (0.00s) fs_test.go:16: TestFS found errors: a-b: Glob(`a[-][b-b]/*a*`): syntax error in pattern FAIL FAIL github.com/foo/bar 4.052s FAIL
CC @rsc
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/294869 mentions this issue: testing/fstest: treat dash specially when building glob
testing/fstest: treat dash specially when building glob
Sorry, something went wrong.
ad17b65
No branches or pull requests
fstest.TestFS
generates a glob pattern (testfs.go#L294), but generates an incorrect one when the directory contains a minus.What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
What did you expect to see?
What did you see instead?
CC @rsc
The text was updated successfully, but these errors were encountered: