Skip to content

Commit

Permalink
Remove goto- prefix on testdata files
Browse files Browse the repository at this point in the history
These files are used for more than just go-to-definition. It's unnecessary
  • Loading branch information
julienduchesne committed Dec 11, 2024
1 parent 0b91f51 commit 451668e
Show file tree
Hide file tree
Showing 57 changed files with 167 additions and 167 deletions.
22 changes: 11 additions & 11 deletions pkg/server/completion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete through binary",
filename: "testdata/goto-basic-object.jsonnet",
filename: "testdata/basic-object.jsonnet",
replaceString: "bar: 'foo',",
replaceByString: "bar: self.",
expected: protocol.CompletionList{
Expand All @@ -216,7 +216,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete locals",
filename: "testdata/goto-basic-object.jsonnet",
filename: "testdata/basic-object.jsonnet",
replaceString: "bar: 'foo',",
replaceByString: "bar: ",
expected: protocol.CompletionList{
Expand All @@ -234,7 +234,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete locals: good prefix",
filename: "testdata/goto-basic-object.jsonnet",
filename: "testdata/basic-object.jsonnet",
replaceString: "bar: 'foo',",
replaceByString: "bar: some",
expected: protocol.CompletionList{
Expand All @@ -252,7 +252,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete locals: bad prefix",
filename: "testdata/goto-basic-object.jsonnet",
filename: "testdata/basic-object.jsonnet",
replaceString: "bar: 'foo',",
replaceByString: "bar: bad",
expected: protocol.CompletionList{
Expand All @@ -262,7 +262,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete through import",
filename: "testdata/goto-imported-file.jsonnet",
filename: "testdata/imported-file.jsonnet",
replaceString: "b: otherfile.bar,",
replaceByString: "b: otherfile.",
expected: protocol.CompletionList{
Expand Down Expand Up @@ -291,7 +291,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete through import with prefix",
filename: "testdata/goto-imported-file.jsonnet",
filename: "testdata/imported-file.jsonnet",
replaceString: "b: otherfile.bar,",
replaceByString: "b: otherfile.b",
expected: protocol.CompletionList{
Expand All @@ -311,7 +311,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete dollar sign",
filename: "testdata/goto-dollar-simple.jsonnet",
filename: "testdata/dollar-simple.jsonnet",
replaceString: "test: $.attribute,",
replaceByString: "test: $.",
expected: protocol.CompletionList{
Expand Down Expand Up @@ -340,7 +340,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete dollar sign, end with comma",
filename: "testdata/goto-dollar-simple.jsonnet",
filename: "testdata/dollar-simple.jsonnet",
replaceString: "test: $.attribute,",
replaceByString: "test: $.,",
expected: protocol.CompletionList{
Expand Down Expand Up @@ -369,7 +369,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete nested imported file",
filename: "testdata/goto-nested-imported-file.jsonnet",
filename: "testdata/nested-imported-file.jsonnet",
replaceString: "foo: file.foo,",
replaceByString: "foo: file.",
expected: protocol.CompletionList{
Expand Down Expand Up @@ -398,7 +398,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "autocomplete multiple fields within local",
filename: "testdata/goto-indexes.jsonnet",
filename: "testdata/indexes.jsonnet",
replaceString: "attr: obj.foo",
replaceByString: "attr: obj.",
expected: protocol.CompletionList{
Expand Down Expand Up @@ -665,7 +665,7 @@ func TestCompletion(t *testing.T) {
},
{
name: "complete attribute from function",
filename: "testdata/goto-functions.libsonnet",
filename: "testdata/functions.libsonnet",
replaceString: "test: myfunc(arg1, arg2)",
replaceByString: "test: myfunc(arg1, arg2).",
expected: protocol.CompletionList{
Expand Down
Loading

0 comments on commit 451668e

Please sign in to comment.