diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-04-05 16:48:47 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-04-05 16:50:11 +0200 |
commit | 6dc31eea438d4ebda06f625b0b656882c806570c (patch) | |
tree | 9bab6f05fcabae7d0a11b3fb95aeea9c2590fc51 /test/functional/legacy/cmdline_spec.lua | |
parent | 463174b5d76d9a88fab02db144aaaac7fa19efd1 (diff) | |
download | rneovim-6dc31eea438d4ebda06f625b0b656882c806570c.tar.gz rneovim-6dc31eea438d4ebda06f625b0b656882c806570c.tar.bz2 rneovim-6dc31eea438d4ebda06f625b0b656882c806570c.zip |
fix(tests): update legacy tab switch test to be sane
Diffstat (limited to 'test/functional/legacy/cmdline_spec.lua')
-rw-r--r-- | test/functional/legacy/cmdline_spec.lua | 66 |
1 files changed, 59 insertions, 7 deletions
diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua index 2868279a97..d8d849271b 100644 --- a/test/functional/legacy/cmdline_spec.lua +++ b/test/functional/legacy/cmdline_spec.lua @@ -11,6 +11,15 @@ describe('cmdline', function() it('is cleared when switching tabs', function() local screen = Screen.new(30, 10) screen:attach() + screen:set_default_attr_ids { + [1] = {underline = true, background = Screen.colors.LightGrey}; + [2] = {bold = true}; + [3] = {reverse = true}; + [4] = {bold = true, foreground = Screen.colors.Blue1}; + } + -- TODO(bfredl): redraw with tabs is severly broken. fix it + feed_command [[ set display-=msgsep ]] + feed_command([[call setline(1, range(30))]]) screen:expect([[ ^0 | @@ -24,15 +33,58 @@ describe('cmdline', function() 8 | :call setline(1, range(30)) | ]]) - feed([[:tabnew<cr><C-w>-<C-w>-gtgt]]) + + feed [[:tabnew<cr>]] + screen:expect{grid=[[ + {1: + [No Name] }{2: [No Name] }{3: }{1:X}| + ^ | + {4:~ }| + {4:~ }| + {4:~ }| + {4:~ }| + {4:~ }| + {4:~ }| + {4:~ }| + :tabnew | + ]]} + + feed [[<C-w>-<C-w>-]] + screen:expect{grid=[[ + {1: + [No Name] }{2: [No Name] }{3: }{1:X}| + ^ | + {4:~ }| + {4:~ }| + {4:~ }| + {4:~ }| + {4:~ }| + | + | + :tabnew | + ]]} + + feed [[gt]] + screen:expect{grid=[[ + {2: + [No Name] }{1: [No Name] }{3: }{1:X}| + ^0 | + 1 | + 2 | + 3 | + 4 | + 5 | + 6 | + 7 | + | + ]]} + + feed [[gt]] screen:expect([[ - + [No Name] [No Name] X| + {1: + [No Name] }{2: [No Name] }{3: }{1:X}| ^ | - ~ | - ~ | - ~ | - ~ | - ~ | + {4:~ }| + {4:~ }| + {4:~ }| + {4:~ }| + {4:~ }| | | | |