| // Copyright 2021 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| . "golang.org/x/tools/internal/lsp/regtest" |
| func TestMultipleAdHocPackages(t *testing.T) { |
| `, func(t *testing.T, env *Env) { |
| if list := env.Completion("a/a.go", env.RegexpSearch("a/a.go", "Println")); list == nil || len(list.Items) == 0 { |
| t.Fatal("expected completions, got none") |
| if list := env.Completion("a/b.go", env.RegexpSearch("a/b.go", "Println")); list == nil || len(list.Items) == 0 { |
| t.Fatal("expected completions, got none") |
| if list := env.Completion("a/a.go", env.RegexpSearch("a/a.go", "Println")); list == nil || len(list.Items) == 0 { |
| t.Fatal("expected completions, got none") |