From 0ed95423de714edac11ccff177b8aee6b7987bac Mon Sep 17 00:00:00 2001 From: ZyX Date: Wed, 28 Jun 2017 14:26:23 +0300 Subject: ex_getln: Call highlight callback inside :try --- test/functional/ui/cmdline_highlight_spec.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'test/functional/ui/cmdline_highlight_spec.lua') diff --git a/test/functional/ui/cmdline_highlight_spec.lua b/test/functional/ui/cmdline_highlight_spec.lua index 12577a4db4..8207a903f4 100644 --- a/test/functional/ui/cmdline_highlight_spec.lua +++ b/test/functional/ui/cmdline_highlight_spec.lua @@ -285,16 +285,23 @@ describe('Command-line coloring', function() ]]) end) it('does the right thing when errorring', function() - if true then return pending('echoerr does not work well now') end set_color_cb('Echoerring') start_prompt('e') - -- FIXME Does not work well with :echoerr: error message overwrites cmdline. + -- FIXME Does not work well with :echoerr: error message not shown. end) it('does the right thing when throwing', function() - if true then return pending('Throwing does not work well now') end set_color_cb('Throwing') start_prompt('e') - -- FIXME Does not work well with :throw: error message overwrites cmdline. + screen:expect([[ + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + : | + {ERR:E5407: Callback has thrown an exception:}| + {ERR: ABC} | + :e^ | + ]]) end) it('stops executing callback after a number of errors', function() set_color_cb('SplittedMultibyteStart') -- cgit