diff options
Diffstat (limited to 'test/functional/legacy/options_spec.lua')
-rw-r--r-- | test/functional/legacy/options_spec.lua | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/test/functional/legacy/options_spec.lua b/test/functional/legacy/options_spec.lua index 1db7afc7a7..d7f5df3a1e 100644 --- a/test/functional/legacy/options_spec.lua +++ b/test/functional/legacy/options_spec.lua @@ -1,6 +1,10 @@ +-- See also: src/nvim/testdir/test_options.vim local helpers = require('test.functional.helpers')(after_each) local command, clear = helpers.command, helpers.clear local source, expect = helpers.source, helpers.expect +local exc_exec = helpers.exc_exec; +local matches = helpers.matches; +local Screen = require('test.functional.ui.screen') describe('options', function() setup(clear) @@ -11,7 +15,7 @@ describe('options', function() end) describe('set', function() - setup(clear) + before_each(clear) it("should keep two comma when 'path' is changed", function() source([[ @@ -24,4 +28,45 @@ describe('set', function() foo,,bar]]) end) + + it('winminheight works', function() + local screen = Screen.new(20, 11) + screen:attach() + source([[ + set wmh=0 stal=2 + below sp | wincmd _ + below sp | wincmd _ + below sp | wincmd _ + below sp + ]]) + matches('E36: Not enough room', exc_exec('set wmh=1')) + end) + + it('scroll works', function() + local screen = Screen.new(42, 16) + screen:attach() + source([[ + set scroll=2 + set laststatus=2 + ]]) + command('verbose set scroll?') + screen:expect([[ + | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + | + scroll=7 | + Last set from changed window size | + Press ENTER or type command to continue^ | + ]]) + end) end) |