functests: Remove some redraw calls

This commit is contained in:
ZyX 2017-05-10 23:14:23 +03:00
parent 4c4f741aec
commit 88d4a260e1

View File

@ -60,9 +60,8 @@ describe('input()', function()
]]) ]])
end) end)
it('works correctly with multiple numeric arguments (many args)', function() it('works correctly with multiple numeric arguments (many args)', function()
command('hi Test ctermfg=Red guifg=Red term=bold') command('echohl Test')
feed([[:echohl Test | call input(1, 2)<CR>]]) feed([[:call input(1, 2)<CR>]])
command('redraw!') -- Without this it shows two `12` lines.
-- None of the above problems happen when testing manually. -- None of the above problems happen when testing manually.
screen:expect([[ screen:expect([[
| |
@ -82,7 +81,7 @@ describe('input()', function()
end) end)
it('works correctly with multiple numeric arguments (dict arg)', function() it('works correctly with multiple numeric arguments (dict arg)', function()
feed([[:echohl Test | echo input({"prompt": 1, "default": 2, "cancelreturn": 3})<CR>]]) feed([[:echohl Test | echo input({"prompt": 1, "default": 2, "cancelreturn": 3})<CR>]])
command('redraw!') -- Without this it shows two `12` lines. command('redraw!') -- Without this it shows `12` on the line above.
-- None of the above problems happen when testing manually. -- None of the above problems happen when testing manually.
screen:expect([[ screen:expect([[
| |
@ -109,8 +108,8 @@ describe('input()', function()
]]) ]])
end) end)
it('allows omitting everything with dictionary argument', function() it('allows omitting everything with dictionary argument', function()
feed(':echohl Test | echo input({})<CR>') command('echohl Test')
command('redraw!') feed([[:call input({})<CR>]])
screen:expect([[ screen:expect([[
| |
{EOB:~ }| {EOB:~ }|
@ -193,9 +192,8 @@ describe('inputdialog()', function()
]]) ]])
end) end)
it('works correctly with multiple numeric arguments (many args)', function() it('works correctly with multiple numeric arguments (many args)', function()
command('hi Test ctermfg=Red guifg=Red term=bold') command('echohl Test')
feed([[:echohl Test | call inputdialog(1, 2)<CR>]]) feed([[:call inputdialog(1, 2)<CR>]])
command('redraw!') -- Without this it shows two `12` lines.
-- None of the above problems happen when testing manually. -- None of the above problems happen when testing manually.
screen:expect([[ screen:expect([[
| |
@ -215,7 +213,7 @@ describe('inputdialog()', function()
end) end)
it('works correctly with multiple numeric arguments (dict arg)', function() it('works correctly with multiple numeric arguments (dict arg)', function()
feed([[:echohl Test | echo inputdialog({"prompt": 1, "default": 2, "cancelreturn": 3})<CR>]]) feed([[:echohl Test | echo inputdialog({"prompt": 1, "default": 2, "cancelreturn": 3})<CR>]])
command('redraw!') -- Without this it shows two `12` lines. command('redraw!') -- Without this it shows `12` on the line above.
-- None of the above problems happen when testing manually. -- None of the above problems happen when testing manually.
screen:expect([[ screen:expect([[
| |
@ -242,8 +240,8 @@ describe('inputdialog()', function()
]]) ]])
end) end)
it('allows omitting everything with dictionary argument', function() it('allows omitting everything with dictionary argument', function()
feed(':echohl Test | echo inputdialog({})<CR>') command('echohl Test')
command('redraw!') feed(':echo inputdialog({})<CR>')
screen:expect([[ screen:expect([[
| |
{EOB:~ }| {EOB:~ }|