2024-04-20 08:44:13 -07:00
|
|
|
local t = require('test.testutil')
|
|
|
|
local n = require('test.functional.testnvim')()
|
2022-11-25 00:07:25 -07:00
|
|
|
local Screen = require('test.functional.ui.screen')
|
2024-04-20 08:44:13 -07:00
|
|
|
|
|
|
|
local clear = n.clear
|
|
|
|
local feed = n.feed
|
2024-04-08 02:03:20 -07:00
|
|
|
local write_file = t.write_file
|
2022-11-25 00:07:25 -07:00
|
|
|
|
|
|
|
before_each(clear)
|
|
|
|
|
|
|
|
describe(':source!', function()
|
2022-11-28 19:17:57 -07:00
|
|
|
-- oldtest: Test_nested_script()
|
2022-11-25 00:07:25 -07:00
|
|
|
it('gives E22 when scripts nested too deep', function()
|
|
|
|
write_file(
|
|
|
|
'Xscript.vim',
|
|
|
|
[[
|
|
|
|
:source! Xscript.vim
|
|
|
|
]]
|
|
|
|
)
|
|
|
|
local screen = Screen.new(75, 6)
|
|
|
|
feed(':source! Xscript.vim\n')
|
|
|
|
screen:expect([[
|
|
|
|
^ |
|
2024-03-27 02:35:50 -07:00
|
|
|
{1:~ }|*4
|
|
|
|
{9:E22: Scripts nested too deep} |
|
2022-11-25 00:07:25 -07:00
|
|
|
]])
|
|
|
|
os.remove('Xscript.vim')
|
|
|
|
end)
|
|
|
|
end)
|