@@ -46,6 +46,65 @@ Expect cs(should add required using):
46
46
}
47
47
48
48
49
+ Given cs():
50
+ using System;
51
+
52
+ public class Test
53
+ {
54
+ public Test()
55
+ {
56
+ Console.WriteLine(Encoding.UTF8.ToString());
57
+ }
58
+ }
59
+
60
+ Execute (run fix usings):
61
+ call OmniSharpTestInitializeBuffer('FixUsings3')
62
+ call OmniSharpWarmup('OmniSharp#actions#usings#Fix', [])
63
+ call OmniSharpTestAwait('OmniSharp#actions#usings#Fix', [])
64
+
65
+ Expect cs(should add another required using):
66
+ using System;
67
+ using System.Text;
68
+
69
+ public class Test
70
+ {
71
+ public Test()
72
+ {
73
+ Console.WriteLine(Encoding.UTF8.ToString());
74
+ }
75
+ }
76
+
77
+
78
+ Given cs():
79
+ using System;
80
+
81
+ public class Test
82
+ {
83
+ public Test()
84
+ {
85
+ Console.WriteLine(Encoding.UTF8.ToString());
86
+ }
87
+ }
88
+
89
+ Execute (run fix usings with virtualedit=all):
90
+ call OmniSharpTestInitializeBuffer('FixUsings4')
91
+ set virtualedit=all
92
+ call OmniSharpWarmup('OmniSharp#actions#usings#Fix', [])
93
+ call OmniSharpTestAwait('OmniSharp#actions#usings#Fix', [])
94
+
95
+ Expect cs(should add another required using):
96
+ using System;
97
+ using System.Text;
98
+
99
+ public class Test
100
+ {
101
+ public Test()
102
+ {
103
+ Console.WriteLine(Encoding.UTF8.ToString());
104
+ }
105
+ }
106
+
107
+
49
108
Given cs():
50
109
public class test {
51
110
class1 ns1 = new class1();
@@ -62,7 +121,7 @@ Given cs():
62
121
}
63
122
64
123
Execute (run fix usings):
65
- call OmniSharpTestInitializeBuffer('FixUsings3 ')
124
+ call OmniSharpTestInitializeBuffer('FixUsings5 ')
66
125
call OmniSharpWarmup('OmniSharp#actions#usings#Fix', [])
67
126
call OmniSharpTestAwait('OmniSharp#actions#usings#Fix', [])
68
127
@@ -82,7 +141,7 @@ Expect cs(should not add ambiguous using):
82
141
}
83
142
84
143
Execute (should return ambiguous usings to Callback):
85
- call OmniSharpTestInitializeBuffer('FixUsings4 ')
144
+ call OmniSharpTestInitializeBuffer('FixUsings6 ')
86
145
call OmniSharpWarmup('OmniSharp#actions#usings#Fix', [])
87
146
let g:OmniSharp_test_locations = []
88
147
function! s:CallbackFixUsings(locations)
@@ -103,7 +162,7 @@ Execute (should return ambiguous usings to Callback):
103
162
AssertEqual g:OmniSharp_test_locations[0].lnum, 2
104
163
105
164
Execute (should add ambiguous usings to quickfix):
106
- call OmniSharpTestInitializeBuffer('FixUsings5 ')
165
+ call OmniSharpTestInitializeBuffer('FixUsings7 ')
107
166
call OmniSharpWarmup('OmniSharp#actions#usings#Fix', [])
108
167
" Cannot use OmniSharpTestAwait, as the callback prevents the default quickfix
109
168
" behaviour
0 commit comments