2024-04-09 04:26:16 -07:00
|
|
|
local t = require('test.functional.testutil')()
|
2022-11-25 00:07:25 -07:00
|
|
|
local Screen = require('test.functional.ui.screen')
|
2024-04-08 02:03:20 -07:00
|
|
|
local clear = t.clear
|
|
|
|
local feed = t.feed
|
|
|
|
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)
|
|
|
|
screen:attach()
|
|
|
|
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)
|