We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89a9cb6 commit f9c628bCopy full SHA for f9c628b
gopls/internal/regtest/misc/embed_test.go
@@ -0,0 +1,31 @@
1
+// Copyright 2021 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+package misc
5
+
6
+import (
7
+ "testing"
8
9
+ . "golang.org/x/tools/gopls/internal/regtest"
10
+ "golang.org/x/tools/internal/testenv"
11
+)
12
13
+func TestMissingPatternDiagnostic(t *testing.T) {
14
+ testenv.NeedsGo1Point(t, 16)
15
+ const files = `
16
+-- go.mod --
17
+module example.com
18
+-- x.go --
19
+package x
20
21
22
+ _ "embed"
23
24
25
+//go:embed NONEXISTENT
26
+var foo string
27
+`
28
+ Run(t, files, func(t *testing.T, env *Env) {
29
+ env.Await(env.DiagnosticAtRegexpWithMessage("x.go", `NONEXISTENT`, "no matching files found"))
30
+ })
31
+}
0 commit comments