test: port libvterm unit test to neovim test suite

These were imported from the v0.3.3 git tag
https://github.com/neovim/libvterm/tree/v0.3.3 and not the latest
commit. This is for compatibility reasons as the libvterm code was
imported from v0.3.3.
This commit is contained in:
dundargoc
2024-09-25 16:07:37 +02:00
committed by dundargoc
parent 07b4cb6ada
commit 4c25e60767
7 changed files with 4146 additions and 2 deletions

View File

@@ -151,6 +151,13 @@ local function filter_complex_blocks(body)
or string.find(line, 'mach_vm_range_recipe')
)
then
-- HACK: remove bitfields from specific structs as luajit can't seem to handle them.
if line:find('struct VTermState') then
line = string.gsub(line, 'state : 8;', 'state;')
end
if line:find('VTermStringFragment') then
line = string.gsub(line, 'size_t.*len : 30;', 'size_t len;')
end
result[#result + 1] = line
end
end