test(ex_terminal_spec): unskip tests that work on Windows (#26310)

This commit is contained in:
zeertzjq 2023-11-30 07:06:23 +08:00 committed by GitHub
parent 8594b0858f
commit 73691b6c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,6 @@ describe(':terminal (with fake shell)', function()
end end
it('with no argument, acts like termopen()', function() it('with no argument, acts like termopen()', function()
skip(is_os('win'))
-- Use the EXIT subcommand to end the process with a non-zero exit code to -- Use the EXIT subcommand to end the process with a non-zero exit code to
-- prevent the buffer from closing automatically -- prevent the buffer from closing automatically
nvim('set_option_value', 'shellcmdflag', 'EXIT', {}) nvim('set_option_value', 'shellcmdflag', 'EXIT', {})
@ -190,7 +189,6 @@ describe(':terminal (with fake shell)', function()
end) end)
it("with no argument, but 'shell' has arguments, acts like termopen()", function() it("with no argument, but 'shell' has arguments, acts like termopen()", function()
skip(is_os('win'))
nvim('set_option_value', 'shell', testprg('shell-test')..' -t jeff', {}) nvim('set_option_value', 'shell', testprg('shell-test')..' -t jeff', {})
terminal_with_fake_shell() terminal_with_fake_shell()
screen:expect([[ screen:expect([[
@ -202,7 +200,6 @@ describe(':terminal (with fake shell)', function()
end) end)
it('executes a given command through the shell', function() it('executes a given command through the shell', function()
skip(is_os('win'))
command('set shellxquote=') -- win: avoid extra quotes command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell('echo hi') terminal_with_fake_shell('echo hi')
screen:expect([[ screen:expect([[
@ -214,7 +211,6 @@ describe(':terminal (with fake shell)', function()
end) end)
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()
skip(is_os('win'))
nvim('set_option_value', 'shell', testprg('shell-test')..' -t jeff', {}) nvim('set_option_value', 'shell', testprg('shell-test')..' -t jeff', {})
command('set shellxquote=') -- win: avoid extra quotes command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell('echo hi') terminal_with_fake_shell('echo hi')
@ -227,7 +223,6 @@ describe(':terminal (with fake shell)', function()
end) end)
it('allows quotes and slashes', function() it('allows quotes and slashes', function()
skip(is_os('win'))
command('set shellxquote=') -- win: avoid extra quotes command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell([[echo 'hello' \ "world"]]) terminal_with_fake_shell([[echo 'hello' \ "world"]])
screen:expect([[ screen:expect([[
@ -247,14 +242,14 @@ describe(':terminal (with fake shell)', function()
end) end)
it('ignores writes if the backing stream closes', function() it('ignores writes if the backing stream closes', function()
terminal_with_fake_shell() terminal_with_fake_shell()
feed('iiXXXXXXX') feed('iiXXXXXXX')
poke_eventloop() poke_eventloop()
-- Race: Though the shell exited (and streams were closed by SIGCHLD -- Race: Though the shell exited (and streams were closed by SIGCHLD
-- handler), :terminal cleanup is pending on the main-loop. -- handler), :terminal cleanup is pending on the main-loop.
-- This write should be ignored (not crash, #5445). -- This write should be ignored (not crash, #5445).
feed('iiYYYYYYY') feed('iiYYYYYYY')
assert_alive() assert_alive()
end) end)
it('works with findfile()', function() it('works with findfile()', function()
@ -264,7 +259,6 @@ describe(':terminal (with fake shell)', function()
end) end)
it('works with :find', function() it('works with :find', function()
skip(is_os('win'))
nvim('set_option_value', 'shellcmdflag', 'EXIT', {}) nvim('set_option_value', 'shellcmdflag', 'EXIT', {})
terminal_with_fake_shell(1) terminal_with_fake_shell(1)
screen:expect([[ screen:expect([[
@ -284,7 +278,6 @@ describe(':terminal (with fake shell)', function()
end) end)
it('works with gf', function() it('works with gf', function()
skip(is_os('win'))
command('set shellxquote=') -- win: avoid extra quotes command('set shellxquote=') -- win: avoid extra quotes
terminal_with_fake_shell([[echo "scripts/shadacat.py"]]) terminal_with_fake_shell([[echo "scripts/shadacat.py"]])
retry(nil, 4 * screen.timeout, function() retry(nil, 4 * screen.timeout, function()