diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-08 02:26:25 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-16 09:13:44 +0200 |
commit | d2d76882f74875d6c1ee10f31524b104eab6375d (patch) | |
tree | 894cf635dafaf879e42c623252f515e504168805 | |
parent | e0763e94ade67c99f9d9f46cd51299b174969927 (diff) | |
download | rneovim-d2d76882f74875d6c1ee10f31524b104eab6375d.tar.gz rneovim-d2d76882f74875d6c1ee10f31524b104eab6375d.tar.bz2 rneovim-d2d76882f74875d6c1ee10f31524b104eab6375d.zip |
win/test: enable more :terminal tests
To deal with SIGWINCH limitations on Windows, change some resize tests
to _shrink_ the screen width. ... But this didn't work, so still
ignoring those tests on Windows.
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/terminal/window_split_tab_spec.lua | 42 |
3 files changed, 18 insertions, 28 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index 22ab0a8c21..4ce33fef7b 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -70,7 +70,6 @@ describe('terminal buffer', function() end) it('cannot be modified directly', function() - if helpers.pending_win32(pending) then return end feed('<c-\\><c-n>dd') screen:expect([[ tty ready | @@ -205,7 +204,6 @@ describe('terminal buffer', function() end) describe('No heap-buffer-overflow when using', function() - if helpers.pending_win32(pending) then return end local testfilename = 'Xtestfile-functional-terminal-buffers_spec' before_each(function() diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 5eb6a5f18c..9930efc402 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -182,9 +182,7 @@ describe(':terminal (with fake shell)', function() end) it('works with gf', function() - if helpers.pending_win32(pending) then return end terminal_with_fake_shell([[echo "scripts/shadacat.py"]]) - wait() screen:expect([[ ready $ echo "scripts/shadacat.py" | | diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua index 4867e0d9fa..27c6c54d19 100644 --- a/test/functional/terminal/window_split_tab_spec.lua +++ b/test/functional/terminal/window_split_tab_spec.lua @@ -4,8 +4,6 @@ local clear = helpers.clear local feed, nvim = helpers.feed, helpers.nvim local feed_command = helpers.feed_command -if helpers.pending_win32(pending) then return end - describe('terminal', function() local screen @@ -25,6 +23,7 @@ describe('terminal', function() end) it('resets its size when entering terminal window', function() + if helpers.pending_win32(pending) then return end feed('<c-\\><c-n>') feed_command('2split') screen:expect([[ @@ -69,31 +68,26 @@ describe('terminal', function() describe('when the screen is resized', function() it('will forward a resize request to the program', function() - screen:try_resize(screen._width + 3, screen._height + 5) + if helpers.pending_win32(pending) then return end + feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom. + screen:try_resize(screen._width - 3, screen._height - 2) screen:expect([[ - tty ready | - rows: 14, cols: 53 | - {1: } | - | - | - | - | - | - | - | - | - | - | - | - {3:-- TERMINAL --} | + tty ready | + rows: 7, cols: 47 | + {2: } | + | + | + | + | + :^ | ]]) - screen:try_resize(screen._width - 6, screen._height - 10) + screen:try_resize(screen._width - 6, screen._height - 3) screen:expect([[ - tty ready | - rows: 14, cols: 53 | - rows: 4, cols: 47 | - {1: } | - {3:-- TERMINAL --} | + tty ready | + rows: 7, cols: 47 | + rows: 4, cols: 41 | + {2: } | + :^ | ]]) end) end) |