Compare commits

...

2 Commits

Author SHA1 Message Date
zeertzjq
fa5fe845cc
Merge pull request #23193 from neovim/backport-23192-to-release-0.9
[Backport release-0.9] test(terminal/channel_spec): fix screen test immediate success
2023-04-19 12:20:21 +08:00
zeertzjq
30581744e4 test(terminal/channel_spec): fix screen test immediate success
Check for the [No Name] after wiping the buffer.

(cherry picked from commit 954fe75eab)
2023-04-19 04:10:23 +00:00

View File

@ -95,15 +95,19 @@ describe('terminal channel is closed and later released if', function()
end)
it('chansend sends lines to terminal channel in proper order', function()
clear()
clear({args = {'--cmd', 'set laststatus=2'}})
local screen = Screen.new(100, 20)
screen:attach()
local shells = is_os('win') and {'cmd.exe', 'pwsh.exe -nop', 'powershell.exe -nop'} or {'sh'}
for _, sh in ipairs(shells) do
command([[bdelete! | let id = termopen(']] .. sh .. [[')]])
command([[let id = termopen(']] .. sh .. [[')]])
command([[call chansend(id, ['echo "hello"', 'echo "world"', ''])]])
screen:expect{
any=[[echo "hello".*echo "world"]]
}
command('bdelete!')
screen:expect{
any='%[No Name%]'
}
end
end)