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.
9 . "golang.org/x/tools/gopls/internal/regtest"
10 "golang.org/x/tools/internal/testenv"
13 func TestMissingPatternDiagnostic(t *testing.T) {
14 testenv.NeedsGo1Point(t, 16)
25 //go:embed NONEXISTENT
28 Run(t, files, func(t *testing.T, env *Env) {
30 env.Await(env.DiagnosticAtRegexpWithMessage("x.go", `NONEXISTENT`, "no matching files found"))
31 env.RegexpReplace("x.go", `NONEXISTENT`, "x.go")
32 env.Await(EmptyDiagnostics("x.go"))