diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-03-22 11:02:52 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-03-23 13:44:35 +0100 |
commit | 0c59771e314d6faaad69676985cd2a11c157ee37 (patch) | |
tree | b83d69de5f7a5877e26a4be8b882857a9477a437 /test/functional/legacy/display_spec.lua | |
parent | dc110cba3c0d48d7c9dbb91900f8be0cf6cf0c9b (diff) | |
download | rneovim-0c59771e314d6faaad69676985cd2a11c157ee37.tar.gz rneovim-0c59771e314d6faaad69676985cd2a11c157ee37.tar.bz2 rneovim-0c59771e314d6faaad69676985cd2a11c157ee37.zip |
refactor(tests): all screen tests should use highlights
This is the first installment of a multi-PR series significantly
refactoring how highlights are being specified.
The end goal is to have a base set of 20 ish most common highlights,
and then specific files only need to add more groups to that as needed.
As a complicating factor, we also want to migrate to the new default
color scheme eventually. But by sharing a base set, that future PR
will hopefully be a lot smaller since a lot of tests will be migrated
just simply by updating the base set in place.
As a first step, fix the anti-pattern than Screen defaults to ignoring
highlights. Highlights are integral part of the screen state, not
something "extra" which we only test "sometimes". For now, we still
allow opt-out via the intentionally ugly
screen._default_attr_ids = nil
The end goal is to get rid of all of these eventually (which will be
easier as part of the color scheme migration)
Diffstat (limited to 'test/functional/legacy/display_spec.lua')
-rw-r--r-- | test/functional/legacy/display_spec.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index 153fad2e22..948f9df1aa 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -149,7 +149,7 @@ describe('display', function() ]]) feed('736|') screen:expect([[ - <<<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:<<<}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|*11 ^aaaaaaaaaaaaaaa | | @@ -157,22 +157,22 @@ describe('display', function() -- The correct part of the last line is moved into view. feed('D') screen:expect([[ - <<<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:<<<}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|*10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^a| - bbbbb bbbbb bbbbb bbbbb bbbbb bb@@@| + bbbbb bbbbb bbbbb bbbbb bbbbb bb{1:@@@}| | ]]) -- "w_skipcol" does not change because the topline is still long enough -- to maintain the current skipcol. feed('g04l11gkD') screen:expect([[ - <<<^a | + {1:<<<}^a | bbbbb bbbbb bbbbb bbbbb bbbbb bbbbb| bbbbb ccccc ccccc ccccc ccccc cccc| c ccccc ccccc ddddd ddddd ddddd ddd| dd ddddd ddddd ddddd | - ~ |*8 + {1:~ }|*8 | ]]) -- "w_skipcol" is reset to bring the entire topline into view because @@ -183,7 +183,7 @@ describe('display', function() aa^a | bbbbb bbbbb bbbbb bbbbb bbbbb bbbbb| bbbbb ccccc ccccc ccccc ccccc cccc| - c ccccc ccccc ddddd ddddd ddddd @@@| + c ccccc ccccc ddddd ddddd ddddd {1:@@@}| | ]]) end) @@ -197,7 +197,7 @@ describe('display', function() norm $j ]]) screen:expect([[ - <<<bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + {1:<<<}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*5 b^b | | @@ -207,7 +207,7 @@ describe('display', function() exec('set number cpo+=n scrolloff=0') feed('$0') screen:expect([[ - <<<b^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + {1:<<<}b^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6 | ]]) @@ -215,14 +215,14 @@ describe('display', function() exec('set smoothscroll') feed('$b') screen:expect([[ - 2 b ^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + {8: 2 }b ^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6 | ]]) -- Same for "ge". feed('$ge') screen:expect([[ - 2 ^b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + {8: 2 }^b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|*6 | ]]) |