functests: Partially uncomment <C-c> test

This commit is contained in:
ZyX 2017-06-28 14:34:12 +03:00
parent 0ed95423de
commit 5e4976559a

View File

@ -332,22 +332,34 @@ describe('Command-line coloring', function()
eq(msg:rep(1), funcs.execute('messages')) eq(msg:rep(1), funcs.execute('messages'))
end) end)
it('allows interrupting callback with <C-c>', function() 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') set_color_cb('Halting')
start_prompt('echo 42') start_prompt('echo 42')
for i = 1, 6 do screen:expect([[
screen:expect([[ ^ |
^ | {EOB:~ }|
{EOB:~ }| {EOB:~ }|
{EOB:~ }| {EOB:~ }|
{EOB:~ }| {EOB:~ }|
{EOB:~ }| {EOB:~ }|
{EOB:~ }| {EOB:~ }|
{EOB:~ }| |
| ]])
]]) feed('<C-c>')
feed('<C-c>') screen:expect([[
end {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([[ screen:expect([[
^ | ^ |
{EOB:~ }| {EOB:~ }|