diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /test/functional/terminal/api_spec.lua | |
parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/terminal/api_spec.lua')
-rw-r--r-- | test/functional/terminal/api_spec.lua | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/test/functional/terminal/api_spec.lua b/test/functional/terminal/api_spec.lua index 79cc5016da..1f10dda551 100644 --- a/test/functional/terminal/api_spec.lua +++ b/test/functional/terminal/api_spec.lua @@ -1,8 +1,10 @@ -local helpers = require('test.functional.helpers')(after_each) -local child_session = require('test.functional.terminal.helpers') -local ok = helpers.ok +local t = require('test.testutil') +local n = require('test.functional.testnvim')() -if helpers.skip(helpers.is_os('win')) then +local tt = require('test.functional.terminal.testutil') +local ok = t.ok + +if t.skip(t.is_os('win')) then return end @@ -11,9 +13,9 @@ describe('api', function() local socket_name = './Xtest_functional_api.sock' before_each(function() - helpers.clear() + n.clear() os.remove(socket_name) - screen = child_session.setup_child_nvim({ + screen = tt.setup_child_nvim({ '-u', 'NONE', '-i', @@ -21,7 +23,7 @@ describe('api', function() '--cmd', 'colorscheme vim', '--cmd', - helpers.nvim_set .. ' notermguicolors', + n.nvim_set .. ' notermguicolors', }) end) after_each(function() @@ -39,7 +41,7 @@ describe('api', function() } -- Start the socket from the child nvim. - child_session.feed_data(":echo serverstart('" .. socket_name .. "')\n") + tt.feed_data(":echo serverstart('" .. socket_name .. "')\n") -- Wait for socket creation. screen:expect([[ @@ -49,10 +51,10 @@ describe('api', function() {3:-- TERMINAL --} | ]]) - local socket_session1 = helpers.connect(socket_name) - local socket_session2 = helpers.connect(socket_name) + local socket_session1 = n.connect(socket_name) + local socket_session2 = n.connect(socket_name) - child_session.feed_data('i[tui] insert-mode') + tt.feed_data('i[tui] insert-mode') -- Wait for stdin to be processed. screen:expect([[ [tui] insert-mode{1: } | |