From a5449f79ac21919d45544c1e9ce86ae003e04298 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 14 Aug 2017 01:17:16 +0300 Subject: [PATCH] functests: Check that input is correctly silenced --- test/functional/ui/cmdline_highlight_spec.lua | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/test/functional/ui/cmdline_highlight_spec.lua b/test/functional/ui/cmdline_highlight_spec.lua index b6288b746e..262d706e4e 100644 --- a/test/functional/ui/cmdline_highlight_spec.lua +++ b/test/functional/ui/cmdline_highlight_spec.lua @@ -342,6 +342,51 @@ describe('Command-line coloring', function() :e^ | ]]) end) + it('silences :echo', function() + set_color_cb('Echoing') + start_prompt('e') + screen:expect([[ + | + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + :e^ | + ]]) + eq('', meths.command_output('messages')) + end) + it('silences :echon', function() + set_color_cb('Echoning') + start_prompt('e') + screen:expect([[ + | + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + :e^ | + ]]) + eq('', meths.command_output('messages')) + end) + it('silences :echomsg', function() + set_color_cb('Echomsging') + start_prompt('e') + screen:expect([[ + | + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + {EOB:~ }| + :e^ | + ]]) + eq('', meths.command_output('messages')) + end) it('does the right thing when throwing', function() set_color_cb('Throwing') start_prompt('e')