Debian Codegraph @

debian/patches/1002-Skip-gopls-internal-lsp-cmd-TestRename-and-TestStats.patch

raw
1 From: Anthony Fok <[email protected]>
2 Date: Thu, 3 Aug 2023 19:20:04 +0800
3 Subject: Skip gopls/internal/cmd TestRename and TestStats
4
5 Origin: vendor
6 Forwarded: not-needed
7 Last-Update: 2023-06-26, 2023-12-25
8
9 TestRename's "in 'package' identifier" subtest expects the error message
10
11 gopls: cannot rename package: module path "example.com" is the same as
12 the package path, so renaming the package directory would have no effect
13
14 but when GO111MODULE=off, gets an alternative error message instead:
15
16 gopls: cannot rename package: missing module information for package "_."
17
18 Similarly, TestStats gives different counts when GO111MODULE=off:
19
20 stats.WorkspaceStats.Views[0].WorkspaceModules = 0, want 1
21 stats.WorkspaceStats.Views[0].WorkspacePackages = 1, want 2
22 ---
23 gopls/internal/cmd/integration_test.go | 2 ++
24 1 file changed, 2 insertions(+)
25
26 diff --git a/gopls/internal/cmd/integration_test.go b/gopls/internal/cmd/integration_test.go
27 index 754d8bf..813d0bb 100644
28 --- a/gopls/internal/cmd/integration_test.go
29 +++ b/gopls/internal/cmd/integration_test.go
30 @@ -737,6 +737,7 @@ func oldname() {}
31
32 // TestRename tests the 'rename' subcommand (rename.go).
33 func TestRename(t *testing.T) {
34 + t.Skip("in 'package' identifier gives different error message without Go mod")
35 t.Parallel()
36
37 tree := writeTree(t, `
38 @@ -851,6 +852,7 @@ const c = 0
39 }
40
41 func TestStats(t *testing.T) {
42 + t.Skip("gives different results without Go mod")
43 t.Parallel()
44
45 tree := writeTree(t, `