From 04e7eb1e29915c87e3a5b03769d60f429ceb791d Mon Sep 17 00:00:00 2001 From: ZyX Date: Tue, 9 May 2017 14:31:19 +0300 Subject: tests: Add tests for vim_strchr --- test/functional/ui/screen_basic_spec.lua | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'test/functional/ui/screen_basic_spec.lua') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 5d89416e4a..bfcdc7f652 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -565,6 +565,46 @@ describe('Screen', function() ]]) end) end) + + describe('press enter', function() + it('does not crash on at “Press ENTER”', function() + command('nnoremap :echo "TEST"') + feed(':ls') + screen:expect([[ + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + :ls | + 1 %a "[No Name]" line 1 | + {7:Press ENTER or type command to continue}^ | + ]]) + feed('') + screen:expect([[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + TEST | + ]]) + end) + end) end) describe('nvim_ui_attach()', function() -- cgit