diff options
Diffstat (limited to 'test/functional/legacy/fold_spec.lua')
-rw-r--r-- | test/functional/legacy/fold_spec.lua | 69 |
1 files changed, 20 insertions, 49 deletions
diff --git a/test/functional/legacy/fold_spec.lua b/test/functional/legacy/fold_spec.lua index 83513a3f94..c39aae87d2 100644 --- a/test/functional/legacy/fold_spec.lua +++ b/test/functional/legacy/fold_spec.lua @@ -15,10 +15,10 @@ describe('folding', function() screen = Screen.new(45, 8) screen:set_default_attr_ids({ - [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText - [2] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey}, -- Folded - [3] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.Grey}, -- FoldColumn - [4] = {foreground = Screen.colors.Brown}, -- LineNr + [1] = { bold = true, foreground = Screen.colors.Blue }, -- NonText + [2] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey }, -- Folded + [3] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.Grey }, -- FoldColumn + [4] = { foreground = Screen.colors.Brown }, -- LineNr }) screen:attach() end) @@ -50,7 +50,7 @@ describe('folding', function() 1 aa]]) end) - it("foldmethod=marker", function() + it('foldmethod=marker', function() screen:try_resize(20, 10) insert([[ dd {{{ @@ -72,18 +72,15 @@ describe('folding', function() dd {{{ | ee {{{ }}} | {{{ | - ff }}} | - ff }}} | + ff }}} |*2 ^ | line 2 foldlevel=2 | - 1 | - 1 | + 1 |*2 | ]]) - end) - it("foldmethod=indent", function() + it('foldmethod=indent', function() screen:try_resize(20, 8) feed_command('set fdm=indent sw=2') insert([[ @@ -109,7 +106,7 @@ describe('folding', function() ]]) end) - it("foldmethod=syntax", function() + it('foldmethod=syntax', function() screen:try_resize(35, 15) insert([[ 1 aa @@ -148,7 +145,7 @@ describe('folding', function() a jj]]) end) - it("foldmethod=expression", function() + it('foldmethod=expression', function() insert([[ 1 aa 2 bb @@ -227,22 +224,14 @@ describe('folding', function() screen:expect([[ {3:+ }{4: 0 }{2:^+-- 2 lines: ·························}| {3:+ }{4: 1 }{2:+-- 2 lines: ·························}| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 | ]]) - feed("j") + feed('j') screen:expect([[ {3:+ }{4: 1 }{2:+-- 2 lines: ·························}| {3:+ }{4: 0 }{2:^+-- 2 lines: ·························}| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*5 | ]]) end) @@ -259,10 +248,7 @@ describe('folding', function() ^one | {2:+-- 2 lines: two····························}| four | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 | ]]) feed('2G') @@ -271,9 +257,7 @@ describe('folding', function() ^two | three | four | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 | ]]) feed('4G') @@ -281,10 +265,7 @@ describe('folding', function() one | {2:+-- 2 lines: two····························}| ^four | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 | ]]) feed('3G') @@ -293,9 +274,7 @@ describe('folding', function() two | ^three | four | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 | ]]) feed('1G') @@ -303,10 +282,7 @@ describe('folding', function() ^one | {2:+-- 2 lines: two····························}| four | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 | ]]) feed('2G') @@ -315,9 +291,7 @@ describe('folding', function() ^two | three | four | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 | ]]) feed('k') @@ -325,10 +299,7 @@ describe('folding', function() ^one | {2:+-- 2 lines: two····························}| four | - {1:~ }| - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*4 | ]]) end) |