diff options
Diffstat (limited to 'test/functional/legacy/scroll_opt_spec.lua')
-rw-r--r-- | test/functional/legacy/scroll_opt_spec.lua | 80 |
1 files changed, 66 insertions, 14 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index 14dbe0caf9..20976089e2 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -31,11 +31,10 @@ describe('smoothscroll', function() it('works with <C-E> and <C-E>', function() exec([[ call setline(1, [ 'line one', 'word '->repeat(20), 'line three', 'long word '->repeat(7), 'line', 'line', 'line', ]) - set smoothscroll + set smoothscroll scrolloff=5 :5 ]]) - local s0 = [[ - line one | + local s1 = [[ word word word word word word word word | word word word word word word word word | word word word word | @@ -46,10 +45,10 @@ describe('smoothscroll', function() line | line | ~ | + ~ | | ]] - local s1 = [[ - word word word word word word word word | + local s2 = [[ word word word word word word word word | word word word word | line three | @@ -60,10 +59,10 @@ describe('smoothscroll', function() line | ~ | ~ | + ~ | | ]] - local s2 = [[ - word word word word word word word word | + local s3 = [[ word word word word | line three | long word long word long word long word | @@ -74,36 +73,79 @@ describe('smoothscroll', function() ~ | ~ | ~ | + ~ | | ]] - local s3 = [[ - word word word word | + local s4 = [[ line three | long word long word long word long word | long word long word long word | - ^line | line | line | + ^line | + ~ | ~ | ~ | ~ | ~ | | ]] - local s4 = [[ + local s5 = [[ + word word word word | line three | long word long word long word long word | long word long word long word | + line | + line | ^line | + ~ | + ~ | + ~ | + ~ | + | + ]] + local s6 = [[ + word word word word word word word word | + word word word word | + line three | + long word long word long word long word | + long word long word long word | line | line | + ^line | ~ | ~ | ~ | + | + ]] + local s7 = [[ + word word word word word word word word | + word word word word word word word word | + word word word word | + line three | + long word long word long word long word | + long word long word long word | + line | + line | + ^line | ~ | ~ | | ]] + local s8 = [[ + line one | + word word word word word word word word | + word word word word word word word word | + word word word word | + line three | + long word long word long word long word | + long word long word long word | + line | + line | + ^line | + ~ | + | + ]] feed('<C-E>') screen:expect(s1) feed('<C-E>') @@ -113,12 +155,22 @@ describe('smoothscroll', function() feed('<C-E>') screen:expect(s4) feed('<C-Y>') - screen:expect(s3) + screen:expect(s5) feed('<C-Y>') - screen:expect(s2) + screen:expect(s6) feed('<C-Y>') + screen:expect(s7) + feed('<C-Y>') + screen:expect(s8) + exec('set foldmethod=indent') + -- move the cursor so we can reuse the same dumps + feed('5G<C-E>') screen:expect(s1) + feed('<C-E>') + screen:expect(s2) + feed('7G<C-Y>') + screen:expect(s7) feed('<C-Y>') - screen:expect(s0) + screen:expect(s8) end) end) |