@@ -15,6 +15,7 @@ func (r *runner) Completion(t *testing.T, src span.Span, test tests.Completion,
15
15
opts .DeepCompletion = false
16
16
opts .Matcher = source .CaseInsensitive
17
17
opts .Literal = strings .Contains (string (src .URI ()), "literal" )
18
+ opts .UnimportedCompletion = false
18
19
})
19
20
if ! strings .Contains (string (src .URI ()), "builtins" ) {
20
21
got = tests .FilterBuiltins (got )
@@ -31,6 +32,7 @@ func (r *runner) CompletionSnippet(t *testing.T, src span.Span, expected tests.C
31
32
opts .DeepCompletion = true
32
33
opts .Matcher = source .Fuzzy
33
34
opts .Literal = true
35
+ opts .UnimportedCompletion = false
34
36
})
35
37
got := tests .FindItem (list , * items [expected .CompletionItem ])
36
38
want := expected .PlainSnippet
@@ -43,9 +45,7 @@ func (r *runner) CompletionSnippet(t *testing.T, src span.Span, expected tests.C
43
45
}
44
46
45
47
func (r * runner ) UnimportedCompletion (t * testing.T , src span.Span , test tests.Completion , items tests.CompletionItems ) {
46
- got := r .callCompletion (t , src , func (opts * source.Options ) {
47
- opts .UnimportedCompletion = true
48
- })
48
+ got := r .callCompletion (t , src , func (opts * source.Options ) {})
49
49
if ! strings .Contains (string (src .URI ()), "builtins" ) {
50
50
got = tests .FilterBuiltins (got )
51
51
}
@@ -59,6 +59,7 @@ func (r *runner) DeepCompletion(t *testing.T, src span.Span, test tests.Completi
59
59
got := r .callCompletion (t , src , func (opts * source.Options ) {
60
60
opts .DeepCompletion = true
61
61
opts .Matcher = source .CaseInsensitive
62
+ opts .UnimportedCompletion = false
62
63
})
63
64
if ! strings .Contains (string (src .URI ()), "builtins" ) {
64
65
got = tests .FilterBuiltins (got )
@@ -73,6 +74,7 @@ func (r *runner) FuzzyCompletion(t *testing.T, src span.Span, test tests.Complet
73
74
got := r .callCompletion (t , src , func (opts * source.Options ) {
74
75
opts .DeepCompletion = true
75
76
opts .Matcher = source .Fuzzy
77
+ opts .UnimportedCompletion = false
76
78
})
77
79
if ! strings .Contains (string (src .URI ()), "builtins" ) {
78
80
got = tests .FilterBuiltins (got )
@@ -86,6 +88,7 @@ func (r *runner) FuzzyCompletion(t *testing.T, src span.Span, test tests.Complet
86
88
func (r * runner ) CaseSensitiveCompletion (t * testing.T , src span.Span , test tests.Completion , items tests.CompletionItems ) {
87
89
got := r .callCompletion (t , src , func (opts * source.Options ) {
88
90
opts .Matcher = source .CaseSensitive
91
+ opts .UnimportedCompletion = false
89
92
})
90
93
if ! strings .Contains (string (src .URI ()), "builtins" ) {
91
94
got = tests .FilterBuiltins (got )
@@ -101,6 +104,7 @@ func (r *runner) RankCompletion(t *testing.T, src span.Span, test tests.Completi
101
104
opts .DeepCompletion = true
102
105
opts .Matcher = source .Fuzzy
103
106
opts .Literal = true
107
+ opts .UnimportedCompletion = false
104
108
})
105
109
want := expected (t , test , items )
106
110
if msg := tests .CheckCompletionOrder (want , got , true ); msg != "" {
0 commit comments