diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /test/functional/legacy/listchars_spec.lua | |
parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/legacy/listchars_spec.lua')
-rw-r--r-- | test/functional/legacy/listchars_spec.lua | 93 |
1 files changed, 44 insertions, 49 deletions
diff --git a/test/functional/legacy/listchars_spec.lua b/test/functional/legacy/listchars_spec.lua index 746e0550a6..db9ec7fc9d 100644 --- a/test/functional/legacy/listchars_spec.lua +++ b/test/functional/legacy/listchars_spec.lua @@ -1,9 +1,10 @@ -- Tests for 'listchars' display with 'list' and :list. -local helpers = require('test.functional.helpers')(after_each) +local n = require('test.functional.testnvim')() local Screen = require('test.functional.ui.screen') -local feed, insert, exec = helpers.feed, helpers.insert, helpers.exec -local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers.expect + +local feed, insert, exec = n.feed, n.insert, n.exec +local clear, feed_command, expect = n.clear, n.feed_command, n.expect -- luacheck: ignore 621 (Indentation) describe("'listchars'", function() @@ -102,12 +103,6 @@ describe("'listchars'", function() it('"exceeds" character does not appear in foldcolumn vim-patch:8.2.3121', function() local screen = Screen.new(60, 10) - screen:set_default_attr_ids({ - [1] = { bold = true, foreground = Screen.colors.Blue }, -- NonText - [2] = { bold = true, reverse = true }, -- StatusLine - [3] = { reverse = true }, -- StatusLineNC - [4] = { background = Screen.colors.Grey, foreground = Screen.colors.DarkBlue }, -- FoldColumn, SignColumn - }) screen:attach() exec([[ call setline(1, ['aaa', '', 'a', 'aaaaaa']) @@ -117,83 +112,83 @@ describe("'listchars'", function() ]]) feed('13<C-W>>') screen:expect([[ - {4: }aaa │{4: }a{1:>}│{4: }^aaa | - {4: } │{4: } │{4: } | - {4: }a │{4: }a │{4: }a | - {4: }aaaaaa │{4: }a{1:>}│{4: }aaaaaa | + {7: }aaa │{7: }a{1:>}│{7: }^aaa | + {7: } │{7: } │{7: } | + {7: }a │{7: }a │{7: }a | + {7: }aaaaaa │{7: }a{1:>}│{7: }aaaaaa | {1:~ }│{1:~ }│{1:~ }|*4 - {3:[No Name] [+] <[+] }{2:[No Name] [+] }| + {2:[No Name] [+] <[+] }{3:[No Name] [+] }| | ]]) feed('<C-W>>') screen:expect([[ - {4: }aaa │{4: }{1:>}│{4: }^aaa | - {4: } │{4: } │{4: } | - {4: }a │{4: }a│{4: }a | - {4: }aaaaaa │{4: }{1:>}│{4: }aaaaaa | + {7: }aaa │{7: }{1:>}│{7: }^aaa | + {7: } │{7: } │{7: } | + {7: }a │{7: }a│{7: }a | + {7: }aaaaaa │{7: }{1:>}│{7: }aaaaaa | {1:~ }│{1:~ }│{1:~ }|*4 - {3:[No Name] [+] <+] }{2:[No Name] [+] }| + {2:[No Name] [+] <+] }{3:[No Name] [+] }| | ]]) feed('<C-W>>') screen:expect([[ - {4: }aaa │{4: }│{4: }^aaa | - {4: } │{4: }│{4: } | - {4: }a │{4: }│{4: }a | - {4: }aaaaaa │{4: }│{4: }aaaaaa | + {7: }aaa │{7: }│{7: }^aaa | + {7: } │{7: }│{7: } | + {7: }a │{7: }│{7: }a | + {7: }aaaaaa │{7: }│{7: }aaaaaa | {1:~ }│{1:~ }│{1:~ }|*4 - {3:[No Name] [+] <] }{2:[No Name] [+] }| + {2:[No Name] [+] <] }{3:[No Name] [+] }| | ]]) feed('<C-W>>') screen:expect([[ - {4: }aaa │{4: }│{4: }^aaa | - {4: } │{4: }│{4: } | - {4: }a │{4: }│{4: }a | - {4: }aaaaaa │{4: }│{4: }aaaaaa | + {7: }aaa │{7: }│{7: }^aaa | + {7: } │{7: }│{7: } | + {7: }a │{7: }│{7: }a | + {7: }aaaaaa │{7: }│{7: }aaaaaa | {1:~ }│{1:~ }│{1:~ }|*4 - {3:[No Name] [+] < }{2:[No Name] [+] }| + {2:[No Name] [+] < }{3:[No Name] [+] }| | ]]) feed('<C-W>>') screen:expect([[ - {4: }aaa │{4: }│{4: }^aaa | - {4: } │{4: }│{4: } | - {4: }a │{4: }│{4: }a | - {4: }aaaaaa │{4: }│{4: }aaaaaa | + {7: }aaa │{7: }│{7: }^aaa | + {7: } │{7: }│{7: } | + {7: }a │{7: }│{7: }a | + {7: }aaaaaa │{7: }│{7: }aaaaaa | {1:~ }│{1:~}│{1:~ }|*4 - {3:[No Name] [+] < }{2:[No Name] [+] }| + {2:[No Name] [+] < }{3:[No Name] [+] }| | ]]) feed('<C-W>h') feed_command('set nowrap foldcolumn=4') screen:expect([[ - {4: }aaa │{4: }^aaa │{4: }aaa | - {4: } │{4: } │{4: } | - {4: }a │{4: }a │{4: }a | - {4: }aaaaaa │{4: }aaaaaa │{4: }aaaaaa | + {7: }aaa │{7: }^aaa │{7: }aaa | + {7: } │{7: } │{7: } | + {7: }a │{7: }a │{7: }a | + {7: }aaaaaa │{7: }aaaaaa │{7: }aaaaaa | {1:~ }│{1:~ }│{1:~ }|*4 - {3:[No Name] [+] }{2:[No Name] [+] }{3:[No Name] [+] }| + {2:[No Name] [+] }{3:[No Name] [+] }{2:[No Name] [+] }| :set nowrap foldcolumn=4 | ]]) feed('15<C-W><lt>') screen:expect([[ - {4: }aaa │{4: }│{4: }aaa | - {4: } │{4: }│{4: } | - {4: }a │{4: }│{4: }a | - {4: }aaaaaa │{4: ^ }│{4: }aaaaaa | + {7: }aaa │{7: }│{7: }aaa | + {7: } │{7: }│{7: } | + {7: }a │{7: }│{7: }a | + {7: }aaaaaa │{7: ^ }│{7: }aaaaaa | {1:~ }│{1:~ }│{1:~ }|*4 - {3:[No Name] [+] }{2:<[+] }{3:[No Name] [+] }| + {2:[No Name] [+] }{3:<[+] }{2:[No Name] [+] }| :set nowrap foldcolumn=4 | ]]) feed('4<C-W><lt>') screen:expect([[ - {4: }aaa │{4: }│{4: }aaa | - {4: } │{4: }│{4: } | - {4: }a │{4: }│{4: }a | - {4: }aaaaaa │{4:^ }│{4: }aaaaaa | + {7: }aaa │{7: }│{7: }aaa | + {7: } │{7: }│{7: } | + {7: }a │{7: }│{7: }a | + {7: }aaaaaa │{7:^ }│{7: }aaaaaa | {1:~ }│{1:~}│{1:~ }|*4 - {3:[No Name] [+] }{2:< }{3:[No Name] [+] }| + {2:[No Name] [+] }{3:< }{2:[No Name] [+] }| :set nowrap foldcolumn=4 | ]]) end) |