aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/execute_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-05-24 19:18:11 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-05-24 19:18:11 +0000
commitff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch)
tree729bbcb92231538fa61dab6c3d890b025484b7f5 /test/functional/vimscript/execute_spec.lua
parent376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff)
parent28c04948a1c887a1cc0cb64de79fa32631700466 (diff)
downloadrneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz
rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2
rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/vimscript/execute_spec.lua')
-rw-r--r--test/functional/vimscript/execute_spec.lua68
1 files changed, 35 insertions, 33 deletions
diff --git a/test/functional/vimscript/execute_spec.lua b/test/functional/vimscript/execute_spec.lua
index 29488ed31c..8caaea39a7 100644
--- a/test/functional/vimscript/execute_spec.lua
+++ b/test/functional/vimscript/execute_spec.lua
@@ -1,15 +1,17 @@
-local helpers = require('test.functional.helpers')(after_each)
-local eq = helpers.eq
-local eval = helpers.eval
-local clear = helpers.clear
-local source = helpers.source
-local exc_exec = helpers.exc_exec
-local pcall_err = helpers.pcall_err
-local fn = helpers.fn
+local t = require('test.testutil')
+local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
-local command = helpers.command
-local feed = helpers.feed
-local is_os = helpers.is_os
+
+local eq = t.eq
+local eval = n.eval
+local clear = n.clear
+local source = n.source
+local exc_exec = n.exc_exec
+local pcall_err = t.pcall_err
+local fn = n.fn
+local command = n.command
+local feed = n.feed
+local is_os = t.is_os
describe('execute()', function()
before_each(clear)
@@ -191,21 +193,21 @@ describe('execute()', function()
feed([[:call Test1()<cr>]])
screen:expect([[
^ |
- ~ |*4
+ {1:~ }|*4
ABCD |
]])
feed([[:call Test2()<cr>]])
screen:expect([[
^ |
- ~ |*4
+ {1:~ }|*4
1234ABCD |
]])
feed([[:call Test3()<cr>]])
screen:expect([[
^ |
- ~ |*4
+ {1:~ }|*4
1234ABCDXZYZ |
]])
@@ -215,39 +217,39 @@ describe('execute()', function()
-- "ef" was overwritten since msg_col was recovered wrongly
screen:expect([[
1234 |
- Error detected while processing function|
- Test4: |
- line 2: |
- abcdABCD |
- Press ENTER or type command to continue^ |
+ {9:Error detected while processing function}|
+ {9: Test4:} |
+ {8:line 2:} |
+ {9:abcd}ABCD |
+ {6:Press ENTER or type command to continue}^ |
]])
feed([[<cr>]]) -- to clear screen
feed([[:call Test5()<cr>]])
screen:expect([[
^ |
- ~ |*4
+ {1:~ }|*4
1234ABCD |
]])
feed([[:call Test6()<cr>]])
screen:expect([[
|
- Error detected while processing function|
- Test6: |
- line 2: |
- E121ABCD |
- Press ENTER or type command to continue^ |
+ {9:Error detected while processing function}|
+ {9: Test6:} |
+ {8:line 2:} |
+ {9:E121}ABCD |
+ {6:Press ENTER or type command to continue}^ |
]])
feed([[:call Test7()<cr>]])
screen:expect([[
- Error detected while processing function|
- Test6: |
- line 2: |
- E121ABCD |
+ {9:Error detected while processing function}|
+ {9: Test6:} |
+ {8:line 2:} |
+ {9:E121}ABCD |
ABCD |
- Press ENTER or type command to continue^ |
+ {6:Press ENTER or type command to continue}^ |
]])
end)
@@ -265,7 +267,7 @@ describe('execute()', function()
command('let g:mes = execute("echon 42", "")')
screen:expect([[
^ |
- ~ |*3
+ {1:~ }|*3
42 |
]])
eq('42', eval('g:mes'))
@@ -289,7 +291,7 @@ describe('execute()', function()
command('let g:mes = execute("echon 42")')
screen:expect([[
^ |
- ~ |*3
+ {1:~ }|*3
|
]])
eq('42', eval('g:mes'))
@@ -298,7 +300,7 @@ describe('execute()', function()
screen:expect {
grid = [[
^ |
- ~ |*3
+ {1:~ }|*3
|
]],
unchanged = true,