mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test: ex_terminal_spec.lua: retry flaky test (#7245)
https://api.travis-ci.org/jobs/271833660/log.txt
This commit is contained in:
parent
cb912a3eda
commit
618cfe03fc
@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
|
|||||||
local clear, wait, nvim = helpers.clear, helpers.wait, helpers.nvim
|
local clear, wait, nvim = helpers.clear, helpers.wait, helpers.nvim
|
||||||
local nvim_dir, source, eq = helpers.nvim_dir, helpers.source, helpers.eq
|
local nvim_dir, source, eq = helpers.nvim_dir, helpers.source, helpers.eq
|
||||||
local feed_command, eval = helpers.feed_command, helpers.eval
|
local feed_command, eval = helpers.feed_command, helpers.eval
|
||||||
|
local retry = helpers.retry
|
||||||
local iswin = helpers.iswin
|
local iswin = helpers.iswin
|
||||||
|
|
||||||
describe(':terminal', function()
|
describe(':terminal', function()
|
||||||
@ -70,7 +71,7 @@ describe(':terminal (with fake shell)', function()
|
|||||||
|
|
||||||
it('with no argument, acts like termopen()', function()
|
it('with no argument, acts like termopen()', function()
|
||||||
terminal_with_fake_shell()
|
terminal_with_fake_shell()
|
||||||
wait()
|
retry(3, 4 * screen.timeout, function()
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^ready $ |
|
^ready $ |
|
||||||
[Process exited 0] |
|
[Process exited 0] |
|
||||||
@ -78,11 +79,11 @@ describe(':terminal (with fake shell)', function()
|
|||||||
:terminal |
|
:terminal |
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
it("with no argument, and 'shell' is set to empty string", function()
|
it("with no argument, and 'shell' is set to empty string", function()
|
||||||
nvim('set_option', 'shell', '')
|
nvim('set_option', 'shell', '')
|
||||||
terminal_with_fake_shell()
|
terminal_with_fake_shell()
|
||||||
wait()
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^ |
|
^ |
|
||||||
~ |
|
~ |
|
||||||
@ -94,7 +95,6 @@ describe(':terminal (with fake shell)', function()
|
|||||||
it("with no argument, but 'shell' has arguments, acts like termopen()", function()
|
it("with no argument, but 'shell' has arguments, acts like termopen()", function()
|
||||||
nvim('set_option', 'shell', nvim_dir..'/shell-test -t jeff')
|
nvim('set_option', 'shell', nvim_dir..'/shell-test -t jeff')
|
||||||
terminal_with_fake_shell()
|
terminal_with_fake_shell()
|
||||||
wait()
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^jeff $ |
|
^jeff $ |
|
||||||
[Process exited 0] |
|
[Process exited 0] |
|
||||||
@ -105,7 +105,6 @@ describe(':terminal (with fake shell)', function()
|
|||||||
|
|
||||||
it('executes a given command through the shell', function()
|
it('executes a given command through the shell', function()
|
||||||
terminal_with_fake_shell('echo hi')
|
terminal_with_fake_shell('echo hi')
|
||||||
wait()
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^ready $ echo hi |
|
^ready $ echo hi |
|
||||||
|
|
|
|
||||||
@ -117,7 +116,6 @@ describe(':terminal (with fake shell)', function()
|
|||||||
it("executes a given command through the shell, when 'shell' has arguments", function()
|
it("executes a given command through the shell, when 'shell' has arguments", function()
|
||||||
nvim('set_option', 'shell', nvim_dir..'/shell-test -t jeff')
|
nvim('set_option', 'shell', nvim_dir..'/shell-test -t jeff')
|
||||||
terminal_with_fake_shell('echo hi')
|
terminal_with_fake_shell('echo hi')
|
||||||
wait()
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^jeff $ echo hi |
|
^jeff $ echo hi |
|
||||||
|
|
|
|
||||||
@ -128,7 +126,6 @@ describe(':terminal (with fake shell)', function()
|
|||||||
|
|
||||||
it('allows quotes and slashes', function()
|
it('allows quotes and slashes', function()
|
||||||
terminal_with_fake_shell([[echo 'hello' \ "world"]])
|
terminal_with_fake_shell([[echo 'hello' \ "world"]])
|
||||||
wait()
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^ready $ echo 'hello' \ "world" |
|
^ready $ echo 'hello' \ "world" |
|
||||||
|
|
|
|
||||||
@ -164,7 +161,6 @@ describe(':terminal (with fake shell)', function()
|
|||||||
|
|
||||||
it('works with :find', function()
|
it('works with :find', function()
|
||||||
terminal_with_fake_shell()
|
terminal_with_fake_shell()
|
||||||
wait()
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^ready $ |
|
^ready $ |
|
||||||
[Process exited 0] |
|
[Process exited 0] |
|
||||||
|
Loading…
Reference in New Issue
Block a user