robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

master
908 B30 linesraw
1local t = require('test.testutil')
2local n = require('test.functional.testnvim')()
3local Screen = require('test.functional.ui.screen')
4
5local describe, it, before_each = t.describe, t.it, t.before_each
6local clear = n.clear
7local feed = n.feed
8local write_file = t.write_file
9
10before_each(clear)
11
12describe(':source!', function()
13  -- oldtest: Test_nested_script()
14  it('gives E22 when scripts nested too deep', function()
15    write_file(
16      'Xscript.vim',
17      [[
18    :source! Xscript.vim
19    ]]
20    )
21    local screen = Screen.new(75, 6)
22    feed(':source! Xscript.vim\n')
23    screen:expect([[
24      ^                                                                           |
25      {1:~                                                                          }|*4
26      {9:E22: Scripts nested too deep}                                               |
27    ]])
28    os.remove('Xscript.vim')
29  end)
30end)