diff options
author | ZyX <kp-pav@yandex.ru> | 2017-05-10 23:05:58 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-05-10 23:05:58 +0300 |
commit | 4c4f741aec1c6faf4f5a06c7c21747e360a465ac (patch) | |
tree | 4d029d4882856eeee7250d7d64a5391dcfc51499 /test/functional/eval/input_spec.lua | |
parent | 5e6f7e1d558fed8ef7b368a62b68d59af6766143 (diff) | |
download | rneovim-4c4f741aec1c6faf4f5a06c7c21747e360a465ac.tar.gz rneovim-4c4f741aec1c6faf4f5a06c7c21747e360a465ac.tar.bz2 rneovim-4c4f741aec1c6faf4f5a06c7c21747e360a465ac.zip |
functests: Remove all wait()s
Diffstat (limited to 'test/functional/eval/input_spec.lua')
-rw-r--r-- | test/functional/eval/input_spec.lua | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/test/functional/eval/input_spec.lua b/test/functional/eval/input_spec.lua index 51fd06dd90..8f790320cf 100644 --- a/test/functional/eval/input_spec.lua +++ b/test/functional/eval/input_spec.lua @@ -2,7 +2,6 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local eq = helpers.eq -local wait = helpers.wait local feed = helpers.feed local meths = helpers.meths local clear = helpers.clear @@ -51,9 +50,7 @@ describe('input()', function() {T:Test} | {T:Foo}^ | ]]) - wait() command('redraw!') - wait() screen:expect([[ | {EOB:~ }| @@ -65,9 +62,7 @@ describe('input()', function() it('works correctly with multiple numeric arguments (many args)', function() command('hi Test ctermfg=Red guifg=Red term=bold') feed([[:echohl Test | call input(1, 2)<CR>]]) - wait() -- Without wait() it first shows `12` line and then empty line. command('redraw!') -- Without this it shows two `12` lines. - wait() -- None of the above problems happen when testing manually. screen:expect([[ | @@ -77,7 +72,6 @@ describe('input()', function() {T:1}2^ | ]]) feed('<BS>') - wait() screen:expect([[ | {EOB:~ }| @@ -88,7 +82,6 @@ describe('input()', function() end) it('works correctly with multiple numeric arguments (dict arg)', function() feed([[:echohl Test | echo input({"prompt": 1, "default": 2, "cancelreturn": 3})<CR>]]) - wait() -- Without wait() it first shows `12` line and then empty line. command('redraw!') -- Without this it shows two `12` lines. -- None of the above problems happen when testing manually. screen:expect([[ @@ -99,7 +92,6 @@ describe('input()', function() {T:1}2^ | ]]) feed('<BS>') - wait() screen:expect([[ | {EOB:~ }| @@ -108,7 +100,6 @@ describe('input()', function() {T:1}^ | ]]) feed('<Esc>') - wait() screen:expect([[ ^ | {EOB:~ }| @@ -119,7 +110,6 @@ describe('input()', function() end) it('allows omitting everything with dictionary argument', function() feed(':echohl Test | echo input({})<CR>') - wait() command('redraw!') screen:expect([[ | @@ -131,33 +121,25 @@ describe('input()', function() end) it('supports completion', function() feed(':let var = input("", "", "custom,CustomCompl")<CR>') - wait() feed('<Tab><CR>') eq('TEST', meths.get_var('var')) feed(':let var = input({"completion": "customlist,CustomListCompl"})<CR>') - wait() feed('<Tab><CR>') - wait() eq('FOO', meths.get_var('var')) end) it('supports cancelreturn', function() feed(':let var = input({"cancelreturn": "BAR"})<CR>') - wait() feed('<Esc>') - wait() eq('BAR', meths.get_var('var')) end) it('supports default string', function() feed(':let var = input("", "DEF1")<CR>') - wait() feed('<CR>') eq('DEF1', meths.get_var('var')) feed(':let var = input({"default": "DEF2"})<CR>') - wait() feed('<CR>') - wait() eq('DEF2', meths.get_var('var')) end) it('errors out on invalid inputs', function() @@ -201,9 +183,7 @@ describe('inputdialog()', function() {T:Test} | {T:Foo}^ | ]]) - wait() command('redraw!') - wait() screen:expect([[ | {EOB:~ }| @@ -215,9 +195,7 @@ describe('inputdialog()', function() it('works correctly with multiple numeric arguments (many args)', function() command('hi Test ctermfg=Red guifg=Red term=bold') feed([[:echohl Test | call inputdialog(1, 2)<CR>]]) - wait() -- Without wait() it first shows `12` line and then empty line. command('redraw!') -- Without this it shows two `12` lines. - wait() -- None of the above problems happen when testing manually. screen:expect([[ | @@ -227,7 +205,6 @@ describe('inputdialog()', function() {T:1}2^ | ]]) feed('<BS>') - wait() screen:expect([[ | {EOB:~ }| @@ -238,7 +215,6 @@ describe('inputdialog()', function() end) it('works correctly with multiple numeric arguments (dict arg)', function() feed([[:echohl Test | echo inputdialog({"prompt": 1, "default": 2, "cancelreturn": 3})<CR>]]) - wait() -- Without wait() it first shows `12` line and then empty line. command('redraw!') -- Without this it shows two `12` lines. -- None of the above problems happen when testing manually. screen:expect([[ @@ -249,7 +225,6 @@ describe('inputdialog()', function() {T:1}2^ | ]]) feed('<BS>') - wait() screen:expect([[ | {EOB:~ }| @@ -258,7 +233,6 @@ describe('inputdialog()', function() {T:1}^ | ]]) feed('<Esc>') - wait() screen:expect([[ ^ | {EOB:~ }| @@ -269,7 +243,6 @@ describe('inputdialog()', function() end) it('allows omitting everything with dictionary argument', function() feed(':echohl Test | echo inputdialog({})<CR>') - wait() command('redraw!') screen:expect([[ | @@ -281,34 +254,25 @@ describe('inputdialog()', function() end) it('supports completion', function() feed(':let var = inputdialog({"completion": "customlist,CustomListCompl"})<CR>') - wait() feed('<Tab><CR>') - wait() eq('FOO', meths.get_var('var')) end) it('supports cancelreturn', function() feed(':let var = inputdialog("", "", "CR1")<CR>') - wait() feed('<Esc>') - wait() eq('CR1', meths.get_var('var')) feed(':let var = inputdialog({"cancelreturn": "BAR"})<CR>') - wait() feed('<Esc>') - wait() eq('BAR', meths.get_var('var')) end) it('supports default string', function() feed(':let var = inputdialog("", "DEF1")<CR>') - wait() feed('<CR>') eq('DEF1', meths.get_var('var')) feed(':let var = inputdialog({"default": "DEF2"})<CR>') - wait() feed('<CR>') - wait() eq('DEF2', meths.get_var('var')) end) it('errors out on invalid inputs', function() |