diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-01-27 14:15:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-27 14:15:08 +0100 |
commit | 8171e96b9640c54eb67a8e5d1082f1fd6e794f23 (patch) | |
tree | 7ef2ee67b4328b7e5478a74bfccc6d5ec6eb8d38 /test/functional/terminal/window_spec.lua | |
parent | f2398a766e094d74ab19f3037872abbc97c16728 (diff) | |
parent | de16c0bf6445f92f2b6e92ba3253d581e5562178 (diff) | |
download | rneovim-8171e96b9640c54eb67a8e5d1082f1fd6e794f23.tar.gz rneovim-8171e96b9640c54eb67a8e5d1082f1fd6e794f23.tar.bz2 rneovim-8171e96b9640c54eb67a8e5d1082f1fd6e794f23.zip |
Merge pull request #9551 from bfredl/multiterm
Fix :terminal resizing, and some multigrid size cleanup
Diffstat (limited to 'test/functional/terminal/window_spec.lua')
-rw-r--r-- | test/functional/terminal/window_spec.lua | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua index 842a81872e..242377f9bd 100644 --- a/test/functional/terminal/window_spec.lua +++ b/test/functional/terminal/window_spec.lua @@ -124,3 +124,101 @@ describe('terminal window', function() end) end) +describe('terminal window with multigrid', function() + local screen + + before_each(function() + clear() + screen = thelpers.screen_setup(0,nil,50,{ext_multigrid=true}) + end) + + it('resizes to requested size', function() + screen:expect([[ + ## grid 1 + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + {3:-- TERMINAL --} | + ## grid 2 + tty ready | + {1: } | + | + | + | + | + ]]) + + screen:try_resize_grid(2, 20, 10) + if iswin() then + screen:expect{any="rows: 10, cols: 20"} + else + screen:expect([[ + ## grid 1 + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + {3:-- TERMINAL --} | + ## grid 2 + tty ready | + rows: 10, cols: 20 | + {1: } | + | + | + | + | + | + | + | + ]]) + end + + screen:try_resize_grid(2, 70, 3) + if iswin() then + screen:expect{any="rows: 3, cols: 70"} + else + screen:expect([[ + ## grid 1 + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + {3:-- TERMINAL --} | + ## grid 2 + rows: 10, cols: 20 | + rows: 3, cols: 70 | + {1: } | + ]]) + end + + screen:try_resize_grid(2, 0, 0) + if iswin() then + screen:expect{any="rows: 6, cols: 50"} + else + screen:expect([[ + ## grid 1 + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + [2:--------------------------------------------------]| + {3:-- TERMINAL --} | + ## grid 2 + tty ready | + rows: 10, cols: 20 | + rows: 3, cols: 70 | + rows: 6, cols: 50 | + {1: } | + | + ]]) + end + end) +end) |