diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-11-13 14:52:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-13 05:52:19 -0800 |
commit | 736c36c02f316c979da363c5120495179a2b6c2a (patch) | |
tree | 97015d6701788a2c0b37b92c25033fff4f779ab9 /test/functional/terminal/ex_terminal_spec.lua | |
parent | 0a96f18ed774ebc27db50eba4d8a4437e970a331 (diff) | |
download | rneovim-736c36c02f316c979da363c5120495179a2b6c2a.tar.gz rneovim-736c36c02f316c979da363c5120495179a2b6c2a.tar.bz2 rneovim-736c36c02f316c979da363c5120495179a2b6c2a.zip |
test: introduce skip() #21010
This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.
Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index a423bc9a5a..48254faa31 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -11,6 +11,7 @@ local ok = helpers.ok local iswin = helpers.iswin local command = helpers.command local isCI = helpers.isCI +local skip = helpers.skip describe(':terminal', function() local screen @@ -46,10 +47,7 @@ describe(':terminal', function() end) it("reads output buffer on terminal reporting #4151", function() - if isCI('cirrus') then - pending('FIXME: cirrus') - end - if helpers.pending_win32(pending) then return end + skip(isCI('cirrus') or iswin()) if iswin() then feed_command([[terminal powershell -NoProfile -NoLogo -Command Write-Host -NoNewline "\"$([char]27)[6n\""; Start-Sleep -Milliseconds 500 ]]) else @@ -146,7 +144,7 @@ describe(':terminal (with fake shell)', function() end it('with no argument, acts like termopen()', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) terminal_with_fake_shell() retry(nil, 4 * screen.timeout, function() screen:expect([[ @@ -170,7 +168,7 @@ describe(':terminal (with fake shell)', function() end) it("with no argument, but 'shell' has arguments, acts like termopen()", function() - if helpers.pending_win32(pending) then return end + skip(iswin()) nvim('set_option', 'shell', testprg('shell-test')..' -t jeff') terminal_with_fake_shell() screen:expect([[ @@ -182,7 +180,7 @@ describe(':terminal (with fake shell)', function() end) it('executes a given command through the shell', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) command('set shellxquote=') -- win: avoid extra quotes terminal_with_fake_shell('echo hi') screen:expect([[ @@ -194,7 +192,7 @@ describe(':terminal (with fake shell)', function() end) it("executes a given command through the shell, when 'shell' has arguments", function() - if helpers.pending_win32(pending) then return end + skip(iswin()) nvim('set_option', 'shell', testprg('shell-test')..' -t jeff') command('set shellxquote=') -- win: avoid extra quotes terminal_with_fake_shell('echo hi') @@ -207,7 +205,7 @@ describe(':terminal (with fake shell)', function() end) it('allows quotes and slashes', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) command('set shellxquote=') -- win: avoid extra quotes terminal_with_fake_shell([[echo 'hello' \ "world"]]) screen:expect([[ @@ -244,7 +242,7 @@ describe(':terminal (with fake shell)', function() end) it('works with :find', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) terminal_with_fake_shell() screen:expect([[ ^ready $ | @@ -263,7 +261,7 @@ describe(':terminal (with fake shell)', function() end) it('works with gf', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) command('set shellxquote=') -- win: avoid extra quotes terminal_with_fake_shell([[echo "scripts/shadacat.py"]]) retry(nil, 4 * screen.timeout, function() |