diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-19 12:10:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 12:10:06 +0800 |
commit | 95c6e1b7418e37530352418e93a18366acef6242 (patch) | |
tree | b6e24e27f50eb2fa687e994a708d3a4894e53a6c | |
parent | c218109744e5aec702b10d4a8bf233b758dacc79 (diff) | |
download | rneovim-95c6e1b7418e37530352418e93a18366acef6242.tar.gz rneovim-95c6e1b7418e37530352418e93a18366acef6242.tar.bz2 rneovim-95c6e1b7418e37530352418e93a18366acef6242.zip |
test(terminal/channel_spec): fix screen test immediate success (#23192)
Check for the [No Name] after wiping the buffer.
-rw-r--r-- | test/functional/terminal/channel_spec.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/terminal/channel_spec.lua b/test/functional/terminal/channel_spec.lua index 2ca7cdb0a2..2cd02be321 100644 --- a/test/functional/terminal/channel_spec.lua +++ b/test/functional/terminal/channel_spec.lua @@ -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) |