diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-03-23 20:01:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-23 20:01:21 +0100 |
commit | 3d9c028a4ce1557af7f7269968db5dd0c480f270 (patch) | |
tree | fa08e1ee69250026610790531336a9dbef0a4aaf /test/functional/core | |
parent | 2c1e8f7e96926f70151d737ea32f1e6ff3589263 (diff) | |
parent | 0c59771e314d6faaad69676985cd2a11c157ee37 (diff) | |
download | rneovim-3d9c028a4ce1557af7f7269968db5dd0c480f270.tar.gz rneovim-3d9c028a4ce1557af7f7269968db5dd0c480f270.tar.bz2 rneovim-3d9c028a4ce1557af7f7269968db5dd0c480f270.zip |
Merge pull request #27980 from bfredl/noignore
refactor(tests): all screen tests should use highlights
Diffstat (limited to 'test/functional/core')
-rw-r--r-- | test/functional/core/job_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/core/main_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/core/startup_spec.lua | 9 |
3 files changed, 12 insertions, 3 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 13f5f9a5e1..9e7f1faa47 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -1233,7 +1233,7 @@ describe('pty process teardown', function() screen:attach() screen:expect([[ ^ | - ~ |*4 + {1:~ }|*4 | ]]) end) diff --git a/test/functional/core/main_spec.lua b/test/functional/core/main_spec.lua index 9d8d64c82d..396ec2c79e 100644 --- a/test/functional/core/main_spec.lua +++ b/test/functional/core/main_spec.lua @@ -120,9 +120,9 @@ describe('command-line option', function() feed('i:cq<CR>') screen:expect([[ | - [Process exited 1] | + [Process exited 1]{2: } | |*5 - -- TERMINAL -- | + {5:-- TERMINAL --} | ]]) --[=[ Example of incorrect output: screen:expect([[ diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index cc58226f48..2e6649d16a 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -83,6 +83,8 @@ describe('startup', function() local screen screen = Screen.new(60, 7) screen:attach() + -- not the same colors on windows for some reason + screen._default_attr_ids = nil local id = fn.termopen({ nvim_prog, '-u', @@ -326,6 +328,9 @@ describe('startup', function() local screen = Screen.new(25, 3) -- Remote UI connected by --embed. screen:attach() + -- TODO: a lot of tests in this file already use the new default color scheme. + -- once we do the batch update of tests to use it, remove this workarond + screen._default_attr_ids = nil command([[echo has('ttyin') has('ttyout')]]) screen:expect([[ ^ | @@ -337,6 +342,7 @@ describe('startup', function() it('in a TTY: has("ttyin")==1 has("ttyout")==1', function() local screen = Screen.new(25, 4) screen:attach() + screen._default_attr_ids = nil if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) end @@ -428,6 +434,7 @@ describe('startup', function() it('input from pipe (implicit) #7679', function() local screen = Screen.new(25, 4) screen:attach() + screen._default_attr_ids = nil if is_os('win') then command([[set shellcmdflag=/s\ /c shellxquote=\"]]) end @@ -589,6 +596,7 @@ describe('startup', function() local screen screen = Screen.new(60, 6) screen:attach() + screen._default_attr_ids = nil local id = fn.termopen({ nvim_prog, '-u', @@ -1123,6 +1131,7 @@ describe('user config init', function() local screen = Screen.new(50, 8) screen:attach() + screen._default_attr_ids = nil fn.termopen({ nvim_prog }, { env = { VIMRUNTIME = os.getenv('VIMRUNTIME'), |