mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 21:37:43 +00:00
test/functional: Fix api/vim_spec.lua.
On Windows the default file format is DOS i.e. newlines are \r\n instead of \n.
This commit is contained in:
committed by
Seth Jackson
parent
04cd3eef24
commit
a48508de0d
@@ -323,6 +323,10 @@ local function expect(contents)
|
||||
return eq(dedent(contents), curbuf_contents())
|
||||
end
|
||||
|
||||
local function os_is_windows()
|
||||
return nvim_eval('has("win32")') == 1
|
||||
end
|
||||
|
||||
local function rmdir(path)
|
||||
if lfs.attributes(path, 'mode') ~= 'directory' then
|
||||
return nil
|
||||
@@ -425,6 +429,7 @@ return {
|
||||
wait = wait,
|
||||
set_session = set_session,
|
||||
write_file = write_file,
|
||||
os_is_windows = os_is_windows,
|
||||
rmdir = rmdir,
|
||||
mkdir = lfs.mkdir,
|
||||
exc_exec = exc_exec,
|
||||
|
||||
Reference in New Issue
Block a user