aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/ex_terminal_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /test/functional/terminal/ex_terminal_spec.lua
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r--test/functional/terminal/ex_terminal_spec.lua26
1 files changed, 14 insertions, 12 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua
index 23b69319f0..6b7e93a864 100644
--- a/test/functional/terminal/ex_terminal_spec.lua
+++ b/test/functional/terminal/ex_terminal_spec.lua
@@ -8,8 +8,10 @@ local feed_command, eval = helpers.feed_command, helpers.eval
local funcs = helpers.funcs
local retry = helpers.retry
local ok = helpers.ok
-local iswin = helpers.iswin
local command = helpers.command
+local skip = helpers.skip
+local is_os = helpers.is_os
+local is_ci = helpers.is_ci
describe(':terminal', function()
local screen
@@ -45,8 +47,8 @@ describe(':terminal', function()
end)
it("reads output buffer on terminal reporting #4151", function()
- if helpers.pending_win32(pending) then return end
- if iswin() then
+ skip(is_ci('cirrus') or is_os('win'))
+ if is_os('win') then
feed_command([[terminal powershell -NoProfile -NoLogo -Command Write-Host -NoNewline "\"$([char]27)[6n\""; Start-Sleep -Milliseconds 500 ]])
else
feed_command([[terminal printf '\e[6n'; sleep 0.5 ]])
@@ -55,7 +57,7 @@ describe(':terminal', function()
end)
it("in normal-mode :split does not move cursor", function()
- if iswin() then
+ if is_os('win') then
feed_command([[terminal for /L \\%I in (1,0,2) do ( echo foo & ping -w 100 -n 1 127.0.0.1 > nul )]])
else
feed_command([[terminal while true; do echo foo; sleep .1; done]])
@@ -142,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(is_os('win'))
terminal_with_fake_shell()
retry(nil, 4 * screen.timeout, function()
screen:expect([[
@@ -166,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(is_os('win'))
nvim('set_option', 'shell', testprg('shell-test')..' -t jeff')
terminal_with_fake_shell()
screen:expect([[
@@ -178,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(is_os('win'))
command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell('echo hi')
screen:expect([[
@@ -190,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(is_os('win'))
nvim('set_option', 'shell', testprg('shell-test')..' -t jeff')
command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell('echo hi')
@@ -203,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(is_os('win'))
command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell([[echo 'hello' \ "world"]])
screen:expect([[
@@ -240,7 +242,7 @@ describe(':terminal (with fake shell)', function()
end)
it('works with :find', function()
- if helpers.pending_win32(pending) then return end
+ skip(is_os('win'))
terminal_with_fake_shell()
screen:expect([[
^ready $ |
@@ -251,7 +253,7 @@ describe(':terminal (with fake shell)', function()
eq('term://', string.match(eval('bufname("%")'), "^term://"))
feed([[<C-\><C-N>]])
feed_command([[find */shadacat.py]])
- if iswin() then
+ if is_os('win') then
eq('scripts\\shadacat.py', eval('bufname("%")'))
else
eq('scripts/shadacat.py', eval('bufname("%")'))
@@ -259,7 +261,7 @@ describe(':terminal (with fake shell)', function()
end)
it('works with gf', function()
- if helpers.pending_win32(pending) then return end
+ skip(is_os('win'))
command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell([[echo "scripts/shadacat.py"]])
retry(nil, 4 * screen.timeout, function()