test: use integers for API Buffer/Window/Tabpage EXT types

This commit is contained in:
Lewis Russell
2024-01-16 13:26:21 +00:00
committed by Lewis Russell
parent 91dc04a5e1
commit 8f02ae82e2
25 changed files with 622 additions and 651 deletions

View File

@@ -1895,7 +1895,7 @@ describe('API/win_extmark', function()
extmarks = {
[2] = {
-- positioned at the end of the 2nd line
{ { id = 1000 }, ns, marks[1], 1, 16 },
{ 1000, ns, marks[1], 1, 16 },
},
},
})
@@ -1921,27 +1921,27 @@ describe('API/win_extmark', function()
extmarks = {
[2] = {
-- notification from 1st call
{ { id = 1000 }, ns, marks[1], 1, 0 },
{ 1000, ns, marks[1], 1, 0 },
-- notifications from 2nd call
{ { id = 1000 }, ns, marks[1], 1, 0 },
{ { id = 1000 }, ns, marks[2], 1, 2 },
{ 1000, ns, marks[1], 1, 0 },
{ 1000, ns, marks[2], 1, 2 },
-- notifications from 3rd call
{ { id = 1000 }, ns, marks[1], 1, 0 },
{ { id = 1000 }, ns, marks[2], 1, 2 },
{ { id = 1000 }, ns, marks[3], 1, 4 },
{ 1000, ns, marks[1], 1, 0 },
{ 1000, ns, marks[2], 1, 2 },
{ 1000, ns, marks[3], 1, 4 },
-- notifications from 4th call
{ { id = 1000 }, ns, marks[1], 1, 0 },
{ { id = 1000 }, ns, marks[2], 1, 2 },
{ { id = 1000 }, ns, marks[3], 1, 4 },
{ { id = 1000 }, ns, marks[4], 1, 6 },
{ 1000, ns, marks[1], 1, 0 },
{ 1000, ns, marks[2], 1, 2 },
{ 1000, ns, marks[3], 1, 4 },
{ 1000, ns, marks[4], 1, 6 },
-- final
-- overlay
{ { id = 1000 }, ns, marks[1], 1, 0 },
{ { id = 1000 }, ns, marks[2], 1, 2 },
{ { id = 1000 }, ns, marks[3], 1, 4 },
{ { id = 1000 }, ns, marks[4], 1, 6 },
{ 1000, ns, marks[1], 1, 0 },
{ 1000, ns, marks[2], 1, 2 },
{ 1000, ns, marks[3], 1, 4 },
{ 1000, ns, marks[4], 1, 6 },
-- eol
{ { id = 1000 }, ns, marks[5], 2, 11 },
{ 1000, ns, marks[5], 2, 11 },
},
},
})
@@ -1966,9 +1966,9 @@ describe('API/win_extmark', function()
extmarks = {
[2] = {
-- positioned at the end of the 2nd line
{ { id = 1000 }, ns, marks[1], 1, 16 },
{ 1000, ns, marks[1], 1, 16 },
-- updated and wrapped to 3rd line
{ { id = 1000 }, ns, marks[1], 2, 2 },
{ 1000, ns, marks[1], 2, 2 },
},
},
})
@@ -1983,9 +1983,9 @@ describe('API/win_extmark', function()
extmarks = {
[2] = {
-- positioned at the end of the 2nd line
{ { id = 1000 }, ns, marks[1], 1, 16 },
{ 1000, ns, marks[1], 1, 16 },
-- updated and wrapped to 3rd line
{ { id = 1000 }, ns, marks[1], 2, 2 },
{ 1000, ns, marks[1], 2, 2 },
-- scrolled up one line, should be handled by grid scroll
},
},
@@ -2021,13 +2021,13 @@ describe('API/win_extmark', function()
extmarks = {
[2] = {
-- positioned at the end of the 2nd line
{ { id = 1000 }, ns, marks[1], 1, 16 },
{ 1000, ns, marks[1], 1, 16 },
-- updated after split
{ { id = 1000 }, ns, marks[1], 1, 16 },
{ 1000, ns, marks[1], 1, 16 },
},
[4] = {
-- only after split
{ { id = 1001 }, ns, marks[1], 1, 16 },
{ 1001, ns, marks[1], 1, 16 },
},
},
})
@@ -2054,14 +2054,14 @@ describe('API/win_extmark', function()
extmarks = {
[2] = {
-- positioned at the end of the 2nd line
{ { id = 1000 }, ns, marks[1], 1, 16 },
{ 1000, ns, marks[1], 1, 16 },
-- updated after split
{ { id = 1000 }, ns, marks[1], 1, 16 },
{ 1000, ns, marks[1], 1, 16 },
},
[4] = {
{ { id = 1001 }, ns, marks[1], 1, 16 },
{ 1001, ns, marks[1], 1, 16 },
-- updated
{ { id = 1001 }, ns, marks[1], 2, 2 },
{ 1001, ns, marks[1], 2, 2 },
},
},
})