diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/legacy/scroll_opt_spec.lua | 13 | ||||
-rw-r--r-- | test/old/testdir/test_scroll_opt.vim | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index 0d0e9640a7..14dbe0caf9 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -14,6 +14,19 @@ describe('smoothscroll', function() screen:attach() end) + -- oldtest: Test_CtrlE_CtrlY_stop_at_end() + it('disabled does not break <C-E> and <C-Y> stop at end', function() + exec([[ + enew + call setline(1, ['one', 'two']) + set number + ]]) + feed('<C-Y>') + screen:expect({any = " 1 ^one"}) + feed('<C-E><C-E><C-E>') + screen:expect({any = " 2 ^two"}) + end) + -- oldtest: Test_smoothscroll_CtrlE_CtrlY() it('works with <C-E> and <C-E>', function() exec([[ diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim index 9375d4ad63..ed3ffd83e7 100644 --- a/test/old/testdir/test_scroll_opt.vim +++ b/test/old/testdir/test_scroll_opt.vim @@ -54,6 +54,19 @@ func Test_scolloff_even_line_count() bwipe! endfunc +func Test_CtrlE_CtrlY_stop_at_end() + enew + call setline(1, ['one', 'two']) + set number + exe "normal \<C-Y>" + call assert_equal([" 1 one "], ScreenLines(1, 10)) + exe "normal \<C-E>\<C-E>\<C-E>" + call assert_equal([" 2 two "], ScreenLines(1, 10)) + + bwipe! + set nonumber +endfunc + func Test_smoothscroll_CtrlE_CtrlY() CheckScreendump |