mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
options: more tests; check first set later; stricter validation
This commit is contained in:
@@ -37,6 +37,25 @@ describe(':set validation', function()
|
||||
it('setlocal and setglobal validate values', function()
|
||||
should_fail('shiftwidth', -10, 'E487')
|
||||
should_fail('tabstop', -10, 'E487')
|
||||
should_fail('winheight', -10, 'E591')
|
||||
should_fail('winheight', -10, 'E487')
|
||||
should_fail('helpheight', -10, 'E487')
|
||||
should_fail('maxcombine', 10, 'E474')
|
||||
should_fail('history', 1000000, 'E474')
|
||||
should_fail('regexpengine', 3, 'E474')
|
||||
|
||||
should_fail('foldlevel', -5, 'E487')
|
||||
should_fail('foldcolumn', 100, 'E474')
|
||||
should_fail('conceallevel', 4, 'E474')
|
||||
should_fail('numberwidth', 20, 'E474')
|
||||
end)
|
||||
|
||||
it('set wmh/wh wmw/wiw checks', function()
|
||||
execute('set winheight=2')
|
||||
execute('set winminheight=3')
|
||||
eq('E591', eval("v:errmsg"):match("E%d*"))
|
||||
|
||||
execute('set winwidth=2')
|
||||
execute('set winminwidth=3')
|
||||
eq('E592', eval("v:errmsg"):match("E%d*"))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user