diff options
author | ZyX <kp-pav@yandex.ru> | 2017-06-28 14:34:12 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-06-28 14:34:12 +0300 |
commit | 5e4976559a0f3e104b3f349593ad184d08c56a89 (patch) | |
tree | 297e282e7b167ff8e87886b82f11c109fc21b315 | |
parent | 0ed95423de714edac11ccff177b8aee6b7987bac (diff) | |
download | rneovim-5e4976559a0f3e104b3f349593ad184d08c56a89.tar.gz rneovim-5e4976559a0f3e104b3f349593ad184d08c56a89.tar.bz2 rneovim-5e4976559a0f3e104b3f349593ad184d08c56a89.zip |
functests: Partially uncomment <C-c> test
-rw-r--r-- | test/functional/ui/cmdline_highlight_spec.lua | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/test/functional/ui/cmdline_highlight_spec.lua b/test/functional/ui/cmdline_highlight_spec.lua index 8207a903f4..f356db88b5 100644 --- a/test/functional/ui/cmdline_highlight_spec.lua +++ b/test/functional/ui/cmdline_highlight_spec.lua @@ -332,22 +332,34 @@ describe('Command-line coloring', function() eq(msg:rep(1), funcs.execute('messages')) end) it('allows interrupting callback with <C-c>', function() - if true then return pending('<C-c> does not work well enough now') end set_color_cb('Halting') start_prompt('echo 42') - for i = 1, 6 do - screen:expect([[ - ^ | - {EOB:~ }| - {EOB:~ }| - {EOB:~ }| - {EOB:~ }| - {EOB:~ }| - {EOB:~ }| - | - ]]) - feed('<C-c>') - end + screen:expect([[ + ^ | + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + | + ]]) + feed('<C-c>') + screen:expect([[ + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + : | + {ERR:E5407: Callback has thrown an exception:}| + {ERR: Keyboard interrupt} | + ^ | + ]]) + if true then return pending('<C-c> should only cancel callback, not input()') end + feed('{REDRAW}') + screen:snapshot_util() + feed('<CR>') + eq('echo 42', meths.get_var('out')) screen:expect([[ ^ | {EOB:~ }| |