From e3f67986f2ea2521659507e7c5f16145eacd9ed3 Mon Sep 17 00:00:00 2001 From: Rob Findley Date: Thu, 9 Nov 2023 15:25:24 -0500 Subject: [PATCH] gopls/internal/regtest/marker: clean up some random packages %percent and noparse are merged into a strangefiles.txt suite, with the caveat that I have no idea why they existed. We already had a placeholder port of the (disabled) nested_complit test. For golang/go#54845 Change-Id: I81fd6a9c2403a9e10380b890495a51dcf243d2d9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/541127 LUCI-TryBot-Result: Go LUCI Reviewed-by: Alan Donovan --- .../lsp/testdata/%percent/perc%ent.go | 1 - .../nested_complit/nested_complit.go.in | 15 ------------- .../lsp/testdata/noparse/noparse.go.in | 0 .../testdata/diagnostics/strangefiles.txt | 21 +++++++++++++++++++ 4 files changed, 21 insertions(+), 16 deletions(-) delete mode 100644 gopls/internal/lsp/testdata/%percent/perc%ent.go delete mode 100644 gopls/internal/lsp/testdata/nested_complit/nested_complit.go.in delete mode 100644 gopls/internal/lsp/testdata/noparse/noparse.go.in create mode 100644 gopls/internal/regtest/marker/testdata/diagnostics/strangefiles.txt diff --git a/gopls/internal/lsp/testdata/%percent/perc%ent.go b/gopls/internal/lsp/testdata/%percent/perc%ent.go deleted file mode 100644 index 93b5e5570bb..00000000000 --- a/gopls/internal/lsp/testdata/%percent/perc%ent.go +++ /dev/null @@ -1 +0,0 @@ -package percent diff --git a/gopls/internal/lsp/testdata/nested_complit/nested_complit.go.in b/gopls/internal/lsp/testdata/nested_complit/nested_complit.go.in deleted file mode 100644 index 3ad2d213e98..00000000000 --- a/gopls/internal/lsp/testdata/nested_complit/nested_complit.go.in +++ /dev/null @@ -1,15 +0,0 @@ -package nested_complit - -type ncFoo struct {} //@item(structNCFoo, "ncFoo", "struct{...}", "struct") - -type ncBar struct { //@item(structNCBar, "ncBar", "struct{...}", "struct") - baz []ncFoo -} - -func _() { - []ncFoo{} //@item(litNCFoo, "[]ncFoo{}", "", "var") - _ := ncBar{ - // disabled - see issue #54822 - baz: [] // complete(" //", structNCFoo, structNCBar) - } -} diff --git a/gopls/internal/lsp/testdata/noparse/noparse.go.in b/gopls/internal/lsp/testdata/noparse/noparse.go.in deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/gopls/internal/regtest/marker/testdata/diagnostics/strangefiles.txt b/gopls/internal/regtest/marker/testdata/diagnostics/strangefiles.txt new file mode 100644 index 00000000000..0a5989f5c20 --- /dev/null +++ b/gopls/internal/regtest/marker/testdata/diagnostics/strangefiles.txt @@ -0,0 +1,21 @@ +This test checks diagnostics on files that are strange for one reason or +another. + +Note(rfindley): ported from the old marker tests. I'm not sure why these were +written originally. + +-ignore_extra_diags is required because the marker framework fails for +noparse.go, and we therefore can't match the EOF error. + +-- flags -- +-ignore_extra_diags + +-- go.mod -- +module golang.org/lsptests + +go 1.18 +-- %percent/perc%ent.go -- +package percent //@diag("percent", re"not included in your workspace") + +-- noparse/noparse.go -- +