aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-03-23 20:01:21 +0100
committerGitHub <noreply@github.com>2024-03-23 20:01:21 +0100
commit3d9c028a4ce1557af7f7269968db5dd0c480f270 (patch)
treefa08e1ee69250026610790531336a9dbef0a4aaf /test/functional/ex_cmds
parent2c1e8f7e96926f70151d737ea32f1e6ff3589263 (diff)
parent0c59771e314d6faaad69676985cd2a11c157ee37 (diff)
downloadrneovim-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/ex_cmds')
-rw-r--r--test/functional/ex_cmds/map_spec.lua53
-rw-r--r--test/functional/ex_cmds/oldfiles_spec.lua1
-rw-r--r--test/functional/ex_cmds/swapfile_preserve_recover_spec.lua1
3 files changed, 29 insertions, 26 deletions
diff --git a/test/functional/ex_cmds/map_spec.lua b/test/functional/ex_cmds/map_spec.lua
index d3b027e6f4..cc863d45cb 100644
--- a/test/functional/ex_cmds/map_spec.lua
+++ b/test/functional/ex_cmds/map_spec.lua
@@ -109,19 +109,19 @@ describe('Screen', function()
command('map <expr> x input("> ")')
screen:expect([[
^ |
- ~ |*3
+ {1:~ }|*3
|
]])
feed('x')
screen:expect([[
|
- ~ |*3
+ {1:~ }|*3
> ^ |
]])
feed('\n')
screen:expect([[
^ |
- ~ |*3
+ {1:~ }|*3
> |
]])
end)
@@ -131,20 +131,20 @@ describe('Screen', function()
feed('i')
screen:expect([[
^ |
- ~ |*3
- -- INSERT -- |
+ {1:~ }|*3
+ {5:-- INSERT --} |
]])
feed('x')
screen:expect([[
|
- ~ |*3
+ {1:~ }|*3
> ^ |
]])
feed('\n')
screen:expect([[
^ |
- ~ |*3
- -- INSERT -- |
+ {1:~ }|*3
+ {5:-- INSERT --} |
]])
end)
@@ -153,7 +153,7 @@ describe('Screen', function()
feed(':<F2>')
screen:expect([[
|
- ~ |*3
+ {1:~ }|*3
:^ |
]])
end)
@@ -181,7 +181,7 @@ describe('Screen', function()
one |
^two |
three |
- [on] |
+ {9:[on] }|
|
]])
end)
@@ -191,15 +191,16 @@ describe('Screen', function()
command('nmap <expr> <F2> execute("throw 42")')
feed('<F2>')
screen:expect([[
- |*2
- Error detected while processing : |
- E605: Exception not caught: 42 |
- Press ENTER or type command to continue^ |
+ |
+ {3: }|
+ {9:Error detected while processing :} |
+ {9:E605: Exception not caught: 42} |
+ {6:Press ENTER or type command to continue}^ |
]])
feed('<CR>')
screen:expect([[
^ |
- ~ |*3
+ {1:~ }|*3
|
]])
end)
@@ -210,32 +211,32 @@ describe('Screen', function()
feed(':echo "foo')
screen:expect([[
|
- ~ |*3
+ {1:~ }|*3
:echo "foo^ |
]])
feed('<F2>')
screen:expect([[
- |
+ {3: }|
:echo "foo |
- Error detected while processing : |
- E605: Exception not caught: 42 |
+ {9:Error detected while processing :} |
+ {9:E605: Exception not caught: 42} |
:echo "foo^ |
]])
feed('"')
screen:expect([[
- |
+ {3: }|
:echo "foo |
- Error detected while processing : |
- E605: Exception not caught: 42 |
+ {9:Error detected while processing :} |
+ {9:E605: Exception not caught: 42} |
:echo "foo"^ |
]])
feed('\n')
screen:expect([[
:echo "foo |
- Error detected while processing : |
- E605: Exception not caught: 42 |
+ {9:Error detected while processing :} |
+ {9:E605: Exception not caught: 42} |
foo |
- Press ENTER or type command to continue^ |
+ {6:Press ENTER or type command to continue}^ |
]])
end)
@@ -246,7 +247,7 @@ describe('Screen', function()
feed(': nmap a<CR>')
screen:expect([[
^ |
- ~ |*3
+ {1:~ }|*3
n a b |
]])
end)
diff --git a/test/functional/ex_cmds/oldfiles_spec.lua b/test/functional/ex_cmds/oldfiles_spec.lua
index 8d1469f343..07ae3ae341 100644
--- a/test/functional/ex_cmds/oldfiles_spec.lua
+++ b/test/functional/ex_cmds/oldfiles_spec.lua
@@ -38,6 +38,7 @@ describe(':oldfiles', function()
it('shows most recently used files', function()
local screen = Screen.new(100, 5)
screen:attach()
+ screen._default_attr_ids = nil
feed_command('edit testfile1')
feed_command('edit testfile2')
feed_command('wshada')
diff --git a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
index a6fdb919c5..7b7dea89c6 100644
--- a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
+++ b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
@@ -170,6 +170,7 @@ describe('swapfile detection', function()
set_session(nvim2)
local screen2 = Screen.new(256, 40)
screen2:attach()
+ screen2._default_attr_ids = nil
exec(init)
command('autocmd! nvim_swapfile') -- Delete the default handler (which skips the dialog).