aboutsummaryrefslogtreecommitdiff
path: root/src/embed
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-11-10 20:28:45 -0800
committerIan Lance Taylor <iant@golang.org>2021-11-11 20:25:49 +0000
commitc622d1d3f68369ec5f8ce9694fa27e7acb025004 (patch)
treebea8c2f5e12ef5a323352f6c13434f56f23750f2 /src/embed
parenteb68e3367bf8d55bb98eb002cef35455f5be3c5f (diff)
downloadgo-c622d1d3f68369ec5f8ce9694fa27e7acb025004.tar.xz
go/build: skip rune literals when looking for go:embed
Fixes #49514 Change-Id: Id687eead731ba49974f11d2e5b489f11eff7d07b Reviewed-on: https://go-review.googlesource.com/c/go/+/363275 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/embed')
-rw-r--r--src/embed/internal/embedtest/embed_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/embed/internal/embedtest/embed_test.go b/src/embed/internal/embedtest/embed_test.go
index bfd94af69d..1337e421bd 100644
--- a/src/embed/internal/embedtest/embed_test.go
+++ b/src/embed/internal/embedtest/embed_test.go
@@ -60,6 +60,11 @@ func testDir(t *testing.T, f embed.FS, name string, expect ...string) {
}
}
+// Tests for issue 49514.
+var _ = '"'
+var _ = '\''
+var _ = '🦆'
+
func TestGlobal(t *testing.T) {
testFiles(t, global, "concurrency.txt", "Concurrency is not parallelism.\n")
testFiles(t, global, "testdata/hello.txt", "hello, world\n")