Skip to content

Commit 7215910

Browse files
committed
update test
1 parent fa2c778 commit 7215910

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/basic/textmerger.lua

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,29 @@ print(12345)
214214
text = "",
215215
},
216216
}
217+
218+
local text = string.rep('abcdefghijklmnopqrstuvwxyz\n', 10000)
219+
local changes = {}
220+
for i = 1, 100 do
221+
changes[#changes+1] = {
222+
range = {
223+
start = { line = i * 10, character = 0 },
224+
['end'] = { line = i * 10, character = 5 },
225+
},
226+
text = 'changed words',
227+
}
228+
end
229+
for i = 1, 100 do
230+
changes[#changes+1] = {
231+
range = {
232+
start = { line = i * 10 + 5000, character = 10 },
233+
['end'] = { line = i * 10 + 5 + 5000, character = 20 },
234+
},
235+
text = '',
236+
}
237+
end
238+
239+
local c1 = os.clock()
240+
tm(text, nil, changes)
241+
local c2 = os.clock()
242+
print('text-merger Large test time:', c2 - c1)

0 commit comments

Comments
 (0)