]> Cypherpunks repositories - gostls13.git/commitdiff
embed/internal/embedtest: use parenthesized vars for one test
authorIan Lance Taylor <iant@golang.org>
Tue, 26 Oct 2021 16:01:34 +0000 (09:01 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 26 Oct 2021 23:12:17 +0000 (23:12 +0000)
The gofrontend code mishandled this case, so add it to the test.

Change-Id: I183b8fab57552320b04c4826c590b7c6d36b6548
Reviewed-on: https://go-review.googlesource.com/c/go/+/358836
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/embed/internal/embedtest/embed_test.go

index b41359f4c2822552fad425240bdb747e521bf935..bfd94af69d259b4acec395b1de65c0a3ad8439b7 100644 (file)
@@ -89,11 +89,13 @@ func TestDir(t *testing.T) {
        testDir(t, all, "testdata/i/j/k", "k8s.txt")
 }
 
-//go:embed testdata
-var testHiddenDir embed.FS
+var (
+       //go:embed testdata
+       testHiddenDir embed.FS
 
-//go:embed testdata/*
-var testHiddenStar embed.FS
+       //go:embed testdata/*
+       testHiddenStar embed.FS
+)
 
 func TestHidden(t *testing.T) {
        dir := testHiddenDir