aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/testdata/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/testdata/script')
-rw-r--r--src/cmd/compile/testdata/script/embedbad.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cmd/compile/testdata/script/embedbad.txt b/src/cmd/compile/testdata/script/embedbad.txt
new file mode 100644
index 0000000000..09e4254561
--- /dev/null
+++ b/src/cmd/compile/testdata/script/embedbad.txt
@@ -0,0 +1,19 @@
+# Check that compiler does not silently crash at bad embed error.
+
+! go build
+stderr 'multiple files for type string'
+stderr 'multiple files for type \[\]byte'
+
+-- go.mod --
+module m
+
+-- x.go --
+package p
+
+import _ "embed"
+
+//go:embed x.go go.mod
+var s string
+
+//go:embed x.go go.mod
+var b []byte