diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-03-27 10:35:50 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-03-27 12:32:53 +0100 |
commit | b556bd1a535d39418b75fe5403e8f117f7f3166c (patch) | |
tree | b571d9be6ef7be7d8adc708fe78a730060968569 /test/functional/legacy/statusline_spec.lua | |
parent | 63f7b1f31eae9e2710bd973f05a575f26e0208d9 (diff) | |
download | rneovim-b556bd1a535d39418b75fe5403e8f117f7f3166c.tar.gz rneovim-b556bd1a535d39418b75fe5403e8f117f7f3166c.tar.bz2 rneovim-b556bd1a535d39418b75fe5403e8f117f7f3166c.zip |
refactor(tests): use global defaults instead of set_default_attr_ids (2)
Diffstat (limited to 'test/functional/legacy/statusline_spec.lua')
-rw-r--r-- | test/functional/legacy/statusline_spec.lua | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/test/functional/legacy/statusline_spec.lua b/test/functional/legacy/statusline_spec.lua index 567e829879..77f906c89a 100644 --- a/test/functional/legacy/statusline_spec.lua +++ b/test/functional/legacy/statusline_spec.lua @@ -15,11 +15,6 @@ describe('statusline', function() end) it('is updated in cmdline mode when using window-local statusline vim-patch:8.2.2737', function() - screen:set_default_attr_ids({ - [1] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - [2] = { bold = true, reverse = true }, -- StatusLine - [3] = { reverse = true }, -- StatusLineNC - }) exec([[ setlocal statusline=-%{mode()}- split @@ -28,30 +23,25 @@ describe('statusline', function() screen:expect([[ ^ | {1:~ }| - {2:+n+ }| + {3:+n+ }| | {1:~ }| - {3:-n- }| + {2:-n- }| | ]]) feed(':') screen:expect([[ | {1:~ }| - {2:+c+ }| + {3:+c+ }| | {1:~ }| - {3:-c- }| + {2:-c- }| :^ | ]]) end) it('truncated item does not cause off-by-one highlight vim-patch:8.2.4929', function() - screen:set_default_attr_ids({ - [1] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - [2] = { foreground = Screen.colors.Blue }, -- User1 - [3] = { background = Screen.colors.Red, foreground = Screen.colors.White }, -- User2 - }) exec([[ set laststatus=2 hi! link User1 Directory @@ -61,20 +51,13 @@ describe('statusline', function() screen:expect([[ ^ | {1:~ }|*4 - {3:<F}{2:GHI }| + {9:<F}{18:GHI }| | ]]) end) -- oldtest: Test_statusline_showcmd() it('showcmdloc=statusline works', function() - screen:set_default_attr_ids({ - [0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - [1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual - [2] = { bold = true }, -- MoreMsg - [3] = { bold = true, reverse = true }, -- StatusLine - [5] = { background = Screen.colors.LightGrey, foreground = Screen.colors.DarkBlue }, -- Folded - }) exec([[ func MyStatusLine() return '%S' @@ -92,9 +75,9 @@ describe('statusline', function() feed('g') screen:expect([[ - {5:+-- 2 lines: a···································}| + {13:+-- 2 lines: a···································}| ^c | - {0:~ }|*3 + {1:~ }|*3 {3:g }| | ]]) @@ -105,19 +88,19 @@ describe('statusline', function() ^a | b | c | - {0:~ }|*2 + {1:~ }|*2 {3: }| | ]]) feed('<C-V>Gl') screen:expect([[ - {1:a} | - {1:b} | - {1:c}^ | - {0:~ }|*2 + {17:a} | + {17:b} | + {17:c}^ | + {1:~ }|*2 {3:3x2 }| - {2:-- VISUAL BLOCK --} | + {5:-- VISUAL BLOCK --} | ]]) feed('<Esc>1234') @@ -125,7 +108,7 @@ describe('statusline', function() a | b | ^c | - {0:~ }|*2 + {1:~ }|*2 {3:1234 }| | ]]) @@ -137,7 +120,7 @@ describe('statusline', function() a | b | ^c | - {0:~ }|*2 + {1:~ }|*2 {3:[No Name] [+] 1234 }| : | ]]) |