mirror of
https://github.com/neovim/neovim.git
synced 2026-02-20 01:09:56 +10:00
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:
@@ -5,6 +5,7 @@ for p in ("${TEST_INCLUDE_DIRS}" .. ";"):gmatch("[^;]+") do
|
||||
table.insert(M.include_paths, p)
|
||||
end
|
||||
|
||||
M.vterm_test_file = "${VTERM_TEST_FILE}"
|
||||
M.test_build_dir = "${CMAKE_BINARY_DIR}"
|
||||
M.test_source_path = "${CMAKE_SOURCE_DIR}"
|
||||
M.test_lua_prg = "${LUA_PRG}"
|
||||
|
||||
@@ -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
|
||||
|
||||
3591
test/unit/vterm_spec.lua
Normal file
3591
test/unit/vterm_spec.lua
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user