Merge pull request #5507 from bfredl/terminal_api

tests: fix racyness in terminal/api_spec.lua
This commit is contained in:
Björn Linse 2016-10-19 22:12:37 +02:00 committed by GitHub
commit 13262aef7a

View File

@ -22,7 +22,7 @@ describe('api', function()
-- Start the socket from the child nvim.
child_session.feed_data(":echo serverstart('"..socket_name.."')\n")
-- Wait for socket creation by abusing expect().
-- Wait for socket creation.
screen:expect([[
{1: } |
{4:~ }|
@ -37,6 +37,16 @@ describe('api', function()
local socket_session2 = helpers.connect(socket_name)
child_session.feed_data("i[tui] insert-mode")
-- Wait for stdin to be processed.
screen:expect([[
[tui] insert-mode{1: } |
{4:~ }|
{4:~ }|
{4:~ }|
{5:[No Name] [+] }|
{3:-- INSERT --} |
{3:-- TERMINAL --} |
]])
ok(socket_session1:request("nvim_ui_attach", 42, 6, {rgb=true}))
ok(socket_session2:request("nvim_ui_attach", 25, 30, {rgb=true}))