robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
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() 14it ( 'gives E22 when scripts nested too deep' , function () 15write_file ( 16'Xscript.vim' , 17[[ 18:source! Xscript.vim 19]] 20) 21local screen =Screen . new ( 75 , 6 ) 22feed ( ':source! Xscript.vim\n' ) 23screen : expect ( [[ 24^ | 25{1:~ }|*4 26{9:E22: Scripts nested too deep} | 27]] ) 28os . remove ( 'Xscript.vim' ) 29end ) 30end )