Skip to content

Commit f27261c

Browse files
committed
test: fix cursor position tests
1 parent f09306a commit f27261c

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

denops/fall/component/input_test.ts

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test({
4444
]);
4545

4646
// Hello, world!
47-
// |||||
47+
// ||||-
4848
// ^
4949
component.cmdline = "Hello, world!";
5050
await component.render(denops);
@@ -74,7 +74,7 @@ test({
7474
]);
7575

7676
// Hello, world!
77-
// |||||
77+
// ||||-
7878
// ^
7979
component.cmdpos = 1;
8080
await component.render(denops);
@@ -104,7 +104,7 @@ test({
104104
]);
105105

106106
// Hello, world!
107-
// |||||
107+
// ||||-
108108
// ^
109109
component.cmdpos = 2;
110110
await component.render(denops);
@@ -134,13 +134,13 @@ test({
134134
]);
135135

136136
// Hello, world!
137-
// |||||
137+
// ||||-
138138
// ^
139139
component.cmdpos = 3;
140140
await component.render(denops);
141141
await denops.cmd("redraw");
142142
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
143-
"> Hello 0/0",
143+
"> ello, 0/0",
144144
]);
145145
assertEquals(await listDecorations(denops, info.bufnr), [
146146
{
@@ -150,7 +150,7 @@ test({
150150
line: 1,
151151
},
152152
{
153-
column: 5,
153+
column: 4,
154154
highlight: HIGHLIGHT_CURSOR,
155155
length: 1,
156156
line: 1,
@@ -164,13 +164,13 @@ test({
164164
]);
165165

166166
// Hello, world!
167-
// |||||
167+
// ||||-
168168
// ^
169169
component.cmdpos = 4;
170170
await component.render(denops);
171171
await denops.cmd("redraw");
172172
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
173-
"> ello, 0/0",
173+
"> llo, 0/0",
174174
]);
175175
assertEquals(await listDecorations(denops, info.bufnr), [
176176
{
@@ -180,7 +180,7 @@ test({
180180
line: 1,
181181
},
182182
{
183-
column: 5,
183+
column: 4,
184184
highlight: HIGHLIGHT_CURSOR,
185185
length: 1,
186186
line: 1,
@@ -194,13 +194,13 @@ test({
194194
]);
195195

196196
// Hello, world!
197-
// |||||
197+
// ||||-
198198
// ^
199199
component.cmdpos = 5;
200200
await component.render(denops);
201201
await denops.cmd("redraw");
202202
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
203-
"> llo, 0/0",
203+
"> lo, w 0/0",
204204
]);
205205
assertEquals(await listDecorations(denops, info.bufnr), [
206206
{
@@ -210,7 +210,7 @@ test({
210210
line: 1,
211211
},
212212
{
213-
column: 5,
213+
column: 4,
214214
highlight: HIGHLIGHT_CURSOR,
215215
length: 1,
216216
line: 1,
@@ -224,13 +224,13 @@ test({
224224
]);
225225

226226
// Hello, world!
227-
// |||||
227+
// ||||-
228228
// ^
229229
component.cmdpos = 6;
230230
await component.render(denops);
231231
await denops.cmd("redraw");
232232
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
233-
"> lo, w 0/0",
233+
"> o, wo 0/0",
234234
]);
235235
assertEquals(await listDecorations(denops, info.bufnr), [
236236
{
@@ -240,7 +240,7 @@ test({
240240
line: 1,
241241
},
242242
{
243-
column: 5,
243+
column: 4,
244244
highlight: HIGHLIGHT_CURSOR,
245245
length: 1,
246246
line: 1,
@@ -254,13 +254,13 @@ test({
254254
]);
255255

256256
// Hello, world!
257-
// |||||
257+
// ||||-
258258
// ^
259259
component.cmdpos = 7;
260260
await component.render(denops);
261261
await denops.cmd("redraw");
262262
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
263-
"> o, wo 0/0",
263+
"> , wor 0/0",
264264
]);
265265
assertEquals(await listDecorations(denops, info.bufnr), [
266266
{
@@ -270,7 +270,7 @@ test({
270270
line: 1,
271271
},
272272
{
273-
column: 5,
273+
column: 4,
274274
highlight: HIGHLIGHT_CURSOR,
275275
length: 1,
276276
line: 1,
@@ -284,13 +284,13 @@ test({
284284
]);
285285

286286
// Hello, world!
287-
// |||||
287+
// ||||-
288288
// ^
289289
component.cmdpos = 8;
290290
await component.render(denops);
291291
await denops.cmd("redraw");
292292
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
293-
"> , wor 0/0",
293+
"> worl 0/0",
294294
]);
295295
assertEquals(await listDecorations(denops, info.bufnr), [
296296
{
@@ -300,7 +300,7 @@ test({
300300
line: 1,
301301
},
302302
{
303-
column: 5,
303+
column: 4,
304304
highlight: HIGHLIGHT_CURSOR,
305305
length: 1,
306306
line: 1,
@@ -314,13 +314,13 @@ test({
314314
]);
315315

316316
// Hello, world!
317-
// |||||
317+
// ||||-
318318
// ^
319319
component.cmdpos = 9;
320320
await component.render(denops);
321321
await denops.cmd("redraw");
322322
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
323-
"> worl 0/0",
323+
"> world 0/0",
324324
]);
325325
assertEquals(await listDecorations(denops, info.bufnr), [
326326
{
@@ -330,7 +330,7 @@ test({
330330
line: 1,
331331
},
332332
{
333-
column: 5,
333+
column: 4,
334334
highlight: HIGHLIGHT_CURSOR,
335335
length: 1,
336336
line: 1,
@@ -344,13 +344,13 @@ test({
344344
]);
345345

346346
// Hello, world!
347-
// |||||
347+
// ||||-
348348
// ^
349349
component.cmdpos = 10;
350350
await component.render(denops);
351351
await denops.cmd("redraw");
352352
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
353-
"> world 0/0",
353+
"> orld! 0/0",
354354
]);
355355
assertEquals(await listDecorations(denops, info.bufnr), [
356356
{
@@ -360,7 +360,7 @@ test({
360360
line: 1,
361361
},
362362
{
363-
column: 5,
363+
column: 4,
364364
highlight: HIGHLIGHT_CURSOR,
365365
length: 1,
366366
line: 1,
@@ -374,13 +374,13 @@ test({
374374
]);
375375

376376
// Hello, world!
377-
// |||||
377+
// ||||-
378378
// ^
379379
component.cmdpos = 11;
380380
await component.render(denops);
381381
await denops.cmd("redraw");
382382
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
383-
"> orld! 0/0",
383+
"> rld! 0/0",
384384
]);
385385
assertEquals(await listDecorations(denops, info.bufnr), [
386386
{
@@ -390,7 +390,7 @@ test({
390390
line: 1,
391391
},
392392
{
393-
column: 5,
393+
column: 4,
394394
highlight: HIGHLIGHT_CURSOR,
395395
length: 1,
396396
line: 1,
@@ -404,13 +404,13 @@ test({
404404
]);
405405

406406
// Hello, world!
407-
// |||||
407+
// ||||-
408408
// ^
409409
component.cmdpos = 12;
410410
await component.render(denops);
411411
await denops.cmd("redraw");
412412
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
413-
"> orld! 0/0",
413+
"> rld! 0/0",
414414
]);
415415
assertEquals(await listDecorations(denops, info.bufnr), [
416416
{
@@ -420,7 +420,7 @@ test({
420420
line: 1,
421421
},
422422
{
423-
column: 6,
423+
column: 5,
424424
highlight: HIGHLIGHT_CURSOR,
425425
length: 1,
426426
line: 1,
@@ -434,13 +434,13 @@ test({
434434
]);
435435

436436
// Hello, world!
437-
// |||||
437+
// ||||-
438438
// ^
439439
component.cmdpos = 13;
440440
await component.render(denops);
441441
await denops.cmd("redraw");
442442
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
443-
"> orld! 0/0",
443+
"> rld! 0/0",
444444
]);
445445
assertEquals(await listDecorations(denops, info.bufnr), [
446446
{
@@ -450,7 +450,7 @@ test({
450450
line: 1,
451451
},
452452
{
453-
column: 7,
453+
column: 6,
454454
highlight: HIGHLIGHT_CURSOR,
455455
length: 1,
456456
line: 1,
@@ -551,7 +551,7 @@ test({
551551
await component.render(denops);
552552
await denops.cmd("redraw");
553553
assertEquals(await fn.getbufline(denops, info.bufnr, 1, "$"), [
554-
"> He 1/2+ X",
554+
"> el 1/2+ X",
555555
]);
556556
});
557557
});

0 commit comments

Comments
 (0)