diff options
Diffstat (limited to 'test/functional/core')
-rw-r--r-- | test/functional/core/channels_spec.lua | 30 | ||||
-rw-r--r-- | test/functional/core/exit_spec.lua | 35 | ||||
-rw-r--r-- | test/functional/core/fileio_spec.lua | 71 | ||||
-rw-r--r-- | test/functional/core/job_spec.lua | 95 | ||||
-rw-r--r-- | test/functional/core/log_spec.lua | 18 | ||||
-rw-r--r-- | test/functional/core/main_spec.lua | 29 | ||||
-rw-r--r-- | test/functional/core/path_spec.lua | 26 | ||||
-rw-r--r-- | test/functional/core/remote_spec.lua | 35 | ||||
-rw-r--r-- | test/functional/core/spellfile_spec.lua | 19 | ||||
-rw-r--r-- | test/functional/core/startup_spec.lua | 100 |
10 files changed, 245 insertions, 213 deletions
diff --git a/test/functional/core/channels_spec.lua b/test/functional/core/channels_spec.lua index 56a2f5a571..a98e190a60 100644 --- a/test/functional/core/channels_spec.lua +++ b/test/functional/core/channels_spec.lua @@ -1,17 +1,19 @@ -local helpers = require('test.functional.helpers')(after_each) -local clear, eq, eval, next_msg, ok, source = - helpers.clear, helpers.eq, helpers.eval, helpers.next_msg, helpers.ok, helpers.source -local command, fn, api = helpers.command, helpers.fn, helpers.api +local t = require('test.testutil') +local n = require('test.functional.testnvim')() + +local clear, eq, eval, next_msg, ok, source = n.clear, t.eq, n.eval, n.next_msg, t.ok, n.source +local command, fn, api = n.command, n.fn, n.api +local matches = t.matches local sleep = vim.uv.sleep -local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv -local get_session, set_session = helpers.get_session, helpers.set_session -local nvim_prog = helpers.nvim_prog -local is_os = helpers.is_os -local retry = helpers.retry -local expect_twostreams = helpers.expect_twostreams -local assert_alive = helpers.assert_alive -local pcall_err = helpers.pcall_err -local skip = helpers.skip +local spawn, nvim_argv = n.spawn, n.nvim_argv +local get_session, set_session = n.get_session, n.set_session +local nvim_prog = n.nvim_prog +local is_os = t.is_os +local retry = t.retry +local expect_twostreams = n.expect_twostreams +local assert_alive = n.assert_alive +local pcall_err = t.pcall_err +local skip = t.skip describe('channels', function() local init = [[ @@ -277,7 +279,7 @@ describe('channels', function() local _, err = pcall(command, "call rpcrequest(id, 'nvim_command', 'call chanclose(v:stderr, \"stdin\")')") - ok(string.find(err, 'E906: invalid stream for channel') ~= nil) + matches('E906: invalid stream for channel', err) eq(1, eval("rpcrequest(id, 'nvim_eval', 'chanclose(v:stderr, \"stderr\")')")) eq({ 'notification', 'stderr', { 3, { '' } } }, next_msg()) diff --git a/test/functional/core/exit_spec.lua b/test/functional/core/exit_spec.lua index d9e3cc3f31..34c3eedbd2 100644 --- a/test/functional/core/exit_spec.lua +++ b/test/functional/core/exit_spec.lua @@ -1,24 +1,25 @@ -local helpers = require('test.functional.helpers')(after_each) - -local assert_alive = helpers.assert_alive -local command = helpers.command -local feed_command = helpers.feed_command -local feed = helpers.feed -local eval = helpers.eval -local eq = helpers.eq -local run = helpers.run -local fn = helpers.fn -local nvim_prog = helpers.nvim_prog -local pcall_err = helpers.pcall_err -local exec_capture = helpers.exec_capture -local poke_eventloop = helpers.poke_eventloop +local t = require('test.testutil') +local n = require('test.functional.testnvim')() + +local assert_alive = n.assert_alive +local command = n.command +local feed_command = n.feed_command +local feed = n.feed +local eval = n.eval +local eq = t.eq +local run = n.run +local fn = n.fn +local nvim_prog = n.nvim_prog +local pcall_err = t.pcall_err +local exec_capture = n.exec_capture +local poke_eventloop = n.poke_eventloop describe('v:exiting', function() local cid before_each(function() - helpers.clear() - cid = helpers.api.nvim_get_chan_info(0).id + n.clear() + cid = n.api.nvim_get_chan_info(0).id end) it('defaults to v:null', function() @@ -74,7 +75,7 @@ describe(':cquit', function() end before_each(function() - helpers.clear() + n.clear() end) it('exits with non-zero after :cquit', function() diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua index 928cab525c..5b0be1e83c 100644 --- a/test/functional/core/fileio_spec.lua +++ b/test/functional/core/fileio_spec.lua @@ -1,37 +1,38 @@ +local t = require('test.testutil') +local n = require('test.functional.testnvim')() +local Screen = require('test.functional.ui.screen') local uv = vim.uv -local helpers = require('test.functional.helpers')(after_each) - -local assert_log = helpers.assert_log -local assert_nolog = helpers.assert_nolog -local clear = helpers.clear -local command = helpers.command -local eq = helpers.eq -local neq = helpers.neq -local ok = helpers.ok -local feed = helpers.feed -local fn = helpers.fn -local nvim_prog = helpers.nvim_prog -local request = helpers.request -local retry = helpers.retry -local rmdir = helpers.rmdir -local matches = helpers.matches -local api = helpers.api -local mkdir = helpers.mkdir + +local assert_log = t.assert_log +local assert_nolog = t.assert_nolog +local clear = n.clear +local command = n.command +local eq = t.eq +local neq = t.neq +local ok = t.ok +local feed = n.feed +local fn = n.fn +local nvim_prog = n.nvim_prog +local request = n.request +local retry = t.retry +local rmdir = n.rmdir +local matches = t.matches +local api = n.api +local mkdir = t.mkdir local sleep = vim.uv.sleep -local read_file = helpers.read_file +local read_file = t.read_file local trim = vim.trim -local currentdir = helpers.fn.getcwd -local assert_alive = helpers.assert_alive -local check_close = helpers.check_close -local expect_exit = helpers.expect_exit -local write_file = helpers.write_file -local Screen = require('test.functional.ui.screen') -local feed_command = helpers.feed_command -local skip = helpers.skip -local is_os = helpers.is_os -local is_ci = helpers.is_ci -local spawn = helpers.spawn -local set_session = helpers.set_session +local currentdir = n.fn.getcwd +local assert_alive = n.assert_alive +local check_close = n.check_close +local expect_exit = n.expect_exit +local write_file = t.write_file +local feed_command = n.feed_command +local skip = t.skip +local is_os = t.is_os +local is_ci = t.is_ci +local spawn = n.spawn +local set_session = n.set_session describe('fileio', function() before_each(function() end) @@ -54,7 +55,7 @@ describe('fileio', function() --- Starts a new nvim session and returns an attached screen. local function startup(extra_args) extra_args = extra_args or {} - local argv = vim.tbl_flatten({ args, '--embed', extra_args }) + local argv = vim.iter({ args, '--embed', extra_args }):flatten():totable() local screen_nvim = spawn(argv) set_session(screen_nvim) local screen = Screen.new(70, 10) @@ -100,7 +101,7 @@ describe('fileio', function() eq('foozubbaz', trim(read_file('Xtest_startup_file1'))) -- 4. Exit caused by deadly signal (+ 'swapfile'). - local j = fn.jobstart(vim.tbl_flatten({ args, '--embed' }), { rpc = true }) + local j = fn.jobstart(vim.iter({ args, '--embed' }):flatten():totable(), { rpc = true }) fn.rpcrequest( j, 'nvim_exec2', @@ -228,7 +229,7 @@ describe('fileio', function() local initial_content = 'foo' local backup_dir = 'Xtest_backupdir' - local sep = helpers.get_pathsep() + local sep = n.get_pathsep() local link_file_name = 'Xtest_startup_file2' local backup_file_name = backup_dir .. sep .. link_file_name .. '~' @@ -329,7 +330,7 @@ describe('tmpdir', function() before_each(function() -- Fake /tmp dir so that we can mess it up. - os_tmpdir = vim.uv.fs_mkdtemp(vim.fs.dirname(helpers.tmpname()) .. '/nvim_XXXXXXXXXX') + os_tmpdir = vim.uv.fs_mkdtemp(vim.fs.dirname(t.tmpname()) .. '/nvim_XXXXXXXXXX') end) after_each(function() diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 13f5f9a5e1..e1efc07452 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -1,40 +1,41 @@ -local helpers = require('test.functional.helpers')(after_each) -local thelpers = require('test.functional.terminal.helpers') - -local clear = helpers.clear -local eq = helpers.eq -local eval = helpers.eval -local exc_exec = helpers.exc_exec -local feed_command = helpers.feed_command -local feed = helpers.feed -local insert = helpers.insert -local neq = helpers.neq -local next_msg = helpers.next_msg -local testprg = helpers.testprg -local ok = helpers.ok -local source = helpers.source -local write_file = helpers.write_file -local mkdir = helpers.mkdir -local rmdir = helpers.rmdir -local assert_alive = helpers.assert_alive -local command = helpers.command -local fn = helpers.fn -local os_kill = helpers.os_kill -local retry = helpers.retry -local api = helpers.api -local NIL = vim.NIL -local poke_eventloop = helpers.poke_eventloop -local get_pathsep = helpers.get_pathsep -local pathroot = helpers.pathroot -local exec_lua = helpers.exec_lua -local nvim_set = helpers.nvim_set -local expect_twostreams = helpers.expect_twostreams -local expect_msg_seq = helpers.expect_msg_seq -local pcall_err = helpers.pcall_err -local matches = helpers.matches +local t = require('test.testutil') +local n = require('test.functional.testnvim')() local Screen = require('test.functional.ui.screen') -local skip = helpers.skip -local is_os = helpers.is_os +local tt = require('test.functional.terminal.testutil') + +local clear = n.clear +local eq = t.eq +local eval = n.eval +local exc_exec = n.exc_exec +local feed_command = n.feed_command +local feed = n.feed +local insert = n.insert +local neq = t.neq +local next_msg = n.next_msg +local testprg = n.testprg +local ok = t.ok +local source = n.source +local write_file = t.write_file +local mkdir = t.mkdir +local rmdir = n.rmdir +local assert_alive = n.assert_alive +local command = n.command +local fn = n.fn +local os_kill = n.os_kill +local retry = t.retry +local api = n.api +local NIL = vim.NIL +local poke_eventloop = n.poke_eventloop +local get_pathsep = n.get_pathsep +local pathroot = n.pathroot +local exec_lua = n.exec_lua +local nvim_set = n.nvim_set +local expect_twostreams = n.expect_twostreams +local expect_msg_seq = n.expect_msg_seq +local pcall_err = t.pcall_err +local matches = t.matches +local skip = t.skip +local is_os = t.is_os describe('jobs', function() local channel @@ -73,7 +74,7 @@ describe('jobs', function() command("let j = jobstart('env', g:job_opts)") end end) - ok(string.find(err, 'E475: Invalid argument: env') ~= nil) + matches('E475: Invalid argument: env', err) end) it('append environment #env', function() @@ -227,7 +228,7 @@ describe('jobs', function() command("let j = jobstart('pwd', g:job_opts)") end end) - ok(string.find(err, 'E475: Invalid argument: expected valid directory$') ~= nil) + matches('E475: Invalid argument: expected valid directory$', err) end) it('error on non-executable `cwd`', function() @@ -307,7 +308,7 @@ describe('jobs', function() it('preserves NULs', function() -- Make a file with NULs in it. - local filename = helpers.tmpname() + local filename = t.tmpname() write_file(filename, 'abc\0def\n') command("let j = jobstart(['cat', '" .. filename .. "'], g:job_opts)") @@ -732,7 +733,7 @@ describe('jobs', function() describe('jobwait()', function() before_each(function() if is_os('win') then - helpers.set_shell_powershell() + n.set_shell_powershell() end end) @@ -980,10 +981,7 @@ describe('jobs', function() command('let g:job_opts.pty = v:true') command('let g:job_opts.rpc = v:true') local _, err = pcall(command, "let j = jobstart(['cat', '-'], g:job_opts)") - ok( - string.find(err, "E475: Invalid argument: job cannot have both 'pty' and 'rpc' options set") - ~= nil - ) + matches("E475: Invalid argument: job cannot have both 'pty' and 'rpc' options set", err) end) it('does not crash when repeatedly failing to start shell', function() @@ -1185,7 +1183,7 @@ describe('jobs', function() end) it('does not close the same handle twice on exit #25086', function() - local filename = string.format('%s.lua', helpers.tmpname()) + local filename = string.format('%s.lua', t.tmpname()) write_file( filename, [[ @@ -1198,7 +1196,7 @@ describe('jobs', function() ]] ) - local screen = thelpers.setup_child_nvim({ + local screen = tt.setup_child_nvim({ '--cmd', 'set notermguicolors', '-i', @@ -1233,15 +1231,16 @@ describe('pty process teardown', function() screen:attach() screen:expect([[ ^ | - ~ |*4 + {1:~ }|*4 | ]]) end) it('does not prevent/delay exit. #4798 #4900', function() + skip(fn.executable('sleep') == 0, 'missing "sleep" command') -- Use a nested nvim (in :term) to test without --headless. fn.termopen({ - helpers.nvim_prog, + n.nvim_prog, '-u', 'NONE', '-i', diff --git a/test/functional/core/log_spec.lua b/test/functional/core/log_spec.lua index 1637e683c1..cac61cda2d 100644 --- a/test/functional/core/log_spec.lua +++ b/test/functional/core/log_spec.lua @@ -1,11 +1,13 @@ -local helpers = require('test.functional.helpers')(after_each) -local assert_log = helpers.assert_log -local clear = helpers.clear -local command = helpers.command -local eq = helpers.eq -local exec_lua = helpers.exec_lua -local expect_exit = helpers.expect_exit -local request = helpers.request +local t = require('test.testutil') +local n = require('test.functional.testnvim')() + +local assert_log = t.assert_log +local clear = n.clear +local command = n.command +local eq = t.eq +local exec_lua = n.exec_lua +local expect_exit = n.expect_exit +local request = n.request describe('log', function() local testlog = 'Xtest_logging' diff --git a/test/functional/core/main_spec.lua b/test/functional/core/main_spec.lua index 9d8d64c82d..5e903726db 100644 --- a/test/functional/core/main_spec.lua +++ b/test/functional/core/main_spec.lua @@ -1,17 +1,18 @@ -local uv = vim.uv -local helpers = require('test.functional.helpers')(after_each) +local t = require('test.testutil') +local n = require('test.functional.testnvim')() local Screen = require('test.functional.ui.screen') +local uv = vim.uv -local eq = helpers.eq -local matches = helpers.matches -local feed = helpers.feed -local eval = helpers.eval -local clear = helpers.clear -local fn = helpers.fn -local nvim_prog_abs = helpers.nvim_prog_abs -local write_file = helpers.write_file -local is_os = helpers.is_os -local skip = helpers.skip +local eq = t.eq +local matches = t.matches +local feed = n.feed +local eval = n.eval +local clear = n.clear +local fn = n.fn +local nvim_prog_abs = n.nvim_prog_abs +local write_file = t.write_file +local is_os = t.is_os +local skip = t.skip describe('command-line option', function() describe('-s', function() @@ -120,9 +121,9 @@ describe('command-line option', function() feed('i:cq<CR>') screen:expect([[ | - [Process exited 1] | + [Process exited 1]{2: } | |*5 - -- TERMINAL -- | + {5:-- TERMINAL --} | ]]) --[=[ Example of incorrect output: screen:expect([[ diff --git a/test/functional/core/path_spec.lua b/test/functional/core/path_spec.lua index e98bfc0d45..d8e274019a 100644 --- a/test/functional/core/path_spec.lua +++ b/test/functional/core/path_spec.lua @@ -1,15 +1,17 @@ -local helpers = require('test.functional.helpers')(after_each) -local clear = helpers.clear -local command = helpers.command -local eq = helpers.eq -local eval = helpers.eval -local feed = helpers.feed -local fn = helpers.fn -local insert = helpers.insert -local is_os = helpers.is_os -local mkdir = helpers.mkdir -local rmdir = helpers.rmdir -local write_file = helpers.write_file +local t = require('test.testutil') +local n = require('test.functional.testnvim')() + +local clear = n.clear +local command = n.command +local eq = t.eq +local eval = n.eval +local feed = n.feed +local fn = n.fn +local insert = n.insert +local is_os = t.is_os +local mkdir = t.mkdir +local rmdir = n.rmdir +local write_file = t.write_file local function join_path(...) local pathsep = (is_os('win') and '\\' or '/') diff --git a/test/functional/core/remote_spec.lua b/test/functional/core/remote_spec.lua index caff06f6ab..6cc28ddeef 100644 --- a/test/functional/core/remote_spec.lua +++ b/test/functional/core/remote_spec.lua @@ -1,20 +1,21 @@ -local helpers = require('test.functional.helpers')(after_each) - -local clear = helpers.clear -local command = helpers.command -local eq = helpers.eq -local exec_capture = helpers.exec_capture -local exec_lua = helpers.exec_lua -local expect = helpers.expect -local fn = helpers.fn -local insert = helpers.insert -local nvim_prog = helpers.nvim_prog -local new_argv = helpers.new_argv -local neq = helpers.neq -local set_session = helpers.set_session -local spawn = helpers.spawn -local tmpname = helpers.tmpname -local write_file = helpers.write_file +local t = require('test.testutil') +local n = require('test.functional.testnvim')() + +local clear = n.clear +local command = n.command +local eq = t.eq +local exec_capture = n.exec_capture +local exec_lua = n.exec_lua +local expect = n.expect +local fn = n.fn +local insert = n.insert +local nvim_prog = n.nvim_prog +local new_argv = n.new_argv +local neq = t.neq +local set_session = n.set_session +local spawn = n.spawn +local tmpname = t.tmpname +local write_file = t.write_file describe('Remote', function() local fname, other_fname diff --git a/test/functional/core/spellfile_spec.lua b/test/functional/core/spellfile_spec.lua index 57953b8f80..e2ccb038e7 100644 --- a/test/functional/core/spellfile_spec.lua +++ b/test/functional/core/spellfile_spec.lua @@ -1,13 +1,14 @@ -local helpers = require('test.functional.helpers')(after_each) +local t = require('test.testutil') +local n = require('test.functional.testnvim')() -local eq = helpers.eq -local clear = helpers.clear -local api = helpers.api -local exc_exec = helpers.exc_exec -local fn = helpers.fn -local rmdir = helpers.rmdir -local write_file = helpers.write_file -local mkdir = helpers.mkdir +local eq = t.eq +local clear = n.clear +local api = n.api +local exc_exec = n.exc_exec +local fn = n.fn +local rmdir = n.rmdir +local write_file = t.write_file +local mkdir = t.mkdir local testdir = 'Xtest-functional-spell-spellfile.d' diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index cc58226f48..a53625ab1b 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -1,37 +1,41 @@ -local helpers = require('test.functional.helpers')(after_each) +local t = require('test.testutil') +local n = require('test.functional.testnvim')() local Screen = require('test.functional.ui.screen') -local assert_alive = helpers.assert_alive -local assert_log = helpers.assert_log -local clear = helpers.clear -local command = helpers.command -local ok = helpers.ok -local eq = helpers.eq -local matches = helpers.matches -local eval = helpers.eval -local exec = helpers.exec -local exec_capture = helpers.exec_capture -local exec_lua = helpers.exec_lua -local feed = helpers.feed -local fn = helpers.fn +local assert_alive = n.assert_alive +local assert_log = t.assert_log +local clear = n.clear +local command = n.command +local ok = t.ok +local eq = t.eq +local matches = t.matches +local eval = n.eval +local exec = n.exec +local exec_capture = n.exec_capture +local exec_lua = n.exec_lua +local feed = n.feed +local fn = n.fn local pesc = vim.pesc -local mkdir = helpers.mkdir -local mkdir_p = helpers.mkdir_p -local nvim_prog = helpers.nvim_prog -local nvim_set = helpers.nvim_set -local read_file = helpers.read_file -local retry = helpers.retry -local rmdir = helpers.rmdir +local mkdir = t.mkdir +local mkdir_p = n.mkdir_p +local nvim_prog = n.nvim_prog +local nvim_set = n.nvim_set +local read_file = t.read_file +local retry = t.retry +local rmdir = n.rmdir local sleep = vim.uv.sleep local startswith = vim.startswith -local write_file = helpers.write_file -local api = helpers.api -local alter_slashes = helpers.alter_slashes -local is_os = helpers.is_os -local dedent = helpers.dedent +local write_file = t.write_file +local api = n.api +local alter_slashes = n.alter_slashes +local is_os = t.is_os +local dedent = t.dedent local tbl_map = vim.tbl_map local tbl_filter = vim.tbl_filter local endswith = vim.endswith +local check_close = n.check_close + +local testlog = 'Xtest-startupspec-log' describe('startup', function() it('--clean', function() @@ -83,6 +87,8 @@ describe('startup', function() local screen screen = Screen.new(60, 7) screen:attach() + -- not the same colors on windows for some reason + screen._default_attr_ids = nil local id = fn.termopen({ nvim_prog, '-u', @@ -97,15 +103,7 @@ describe('startup', function() VIMRUNTIME = os.getenv('VIMRUNTIME'), }, }) - screen:expect([[ - ^ | - | - Entering Debug mode. Type "cont" to continue. | - nvim_exec2() | - cmd: aunmenu * | - > | - | - ]]) + screen:expect({ any = pesc('Entering Debug mode. Type "cont" to continue.') }) fn.chansend(id, 'cont\n') screen:expect([[ ^ | @@ -119,6 +117,11 @@ end) describe('startup', function() before_each(clear) + after_each(function() + check_close() + os.remove(testlog) + end) + describe('-l Lua', function() local function assert_l_out(expected, nvim_args, lua_args, script, input) local args = { nvim_prog } @@ -326,6 +329,9 @@ describe('startup', function() local screen = Screen.new(25, 3) -- Remote UI connected by --embed. screen:attach() + -- TODO: a lot of tests in this file already use the new default color scheme. + -- once we do the batch update of tests to use it, remove this workarond + screen._default_attr_ids = nil command([[echo has('ttyin') has('ttyout')]]) screen:expect([[ ^ | @@ -337,6 +343,7 @@ describe('startup', function() it('in a TTY: has("ttyin")==1 has("ttyout")==1', function() local screen = Screen.new(25, 4) screen:attach() + screen._default_attr_ids = nil if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) end @@ -365,6 +372,7 @@ describe('startup', function() end) it('output to pipe: has("ttyin")==1 has("ttyout")==0', function() + clear({ env = { NVIM_LOG_FILE = testlog } }) if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) end @@ -392,9 +400,13 @@ describe('startup', function() read_file('Xtest_startup_ttyout') ) end) + if is_os('win') then + assert_log('stream write failed. RPC canceled; closing channel', testlog) + end end) it('input from pipe: has("ttyin")==0 has("ttyout")==1', function() + clear({ env = { NVIM_LOG_FILE = testlog } }) if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) end @@ -423,11 +435,16 @@ describe('startup', function() read_file('Xtest_startup_ttyout') ) end) + if is_os('win') then + assert_log('stream write failed. RPC canceled; closing channel', testlog) + end end) it('input from pipe (implicit) #7679', function() + clear({ env = { NVIM_LOG_FILE = testlog } }) local screen = Screen.new(25, 4) screen:attach() + screen._default_attr_ids = nil if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) end @@ -450,6 +467,9 @@ describe('startup', function() 0 1 | | ]]) + if not is_os('win') then + assert_log('Failed to get flags on descriptor 3: Bad file descriptor', testlog, 100) + end end) it('input from pipe + file args #7679', function() @@ -589,6 +609,7 @@ describe('startup', function() local screen screen = Screen.new(60, 6) screen:attach() + screen._default_attr_ids = nil local id = fn.termopen({ nvim_prog, '-u', @@ -974,7 +995,7 @@ describe('sysinit', function() local xdgdir = 'Xxdg' local vimdir = 'Xvim' local xhome = 'Xhome' - local pathsep = helpers.get_pathsep() + local pathsep = n.get_pathsep() before_each(function() rmdir(xdgdir) @@ -1035,7 +1056,7 @@ end) describe('user config init', function() local xhome = 'Xhome' - local pathsep = helpers.get_pathsep() + local pathsep = n.get_pathsep() local xconfig = xhome .. pathsep .. 'Xconfig' local xdata = xhome .. pathsep .. 'Xdata' local init_lua_path = table.concat({ xconfig, 'nvim', 'init.lua' }, pathsep) @@ -1123,6 +1144,7 @@ describe('user config init', function() local screen = Screen.new(50, 8) screen:attach() + screen._default_attr_ids = nil fn.termopen({ nvim_prog }, { env = { VIMRUNTIME = os.getenv('VIMRUNTIME'), @@ -1197,7 +1219,7 @@ end) describe('runtime:', function() local xhome = 'Xhome' - local pathsep = helpers.get_pathsep() + local pathsep = n.get_pathsep() local xconfig = xhome .. pathsep .. 'Xconfig' local xdata = xhome .. pathsep .. 'Xdata' local xenv = { XDG_CONFIG_HOME = xconfig, XDG_DATA_HOME = xdata } @@ -1339,7 +1361,7 @@ end) describe('user session', function() local xhome = 'Xhome' - local pathsep = helpers.get_pathsep() + local pathsep = n.get_pathsep() local session_file = table.concat({ xhome, 'session.lua' }, pathsep) before_each(function() |