test_source.vim: move Test_source_sandbox

This commit is contained in:
Daniel Hahler 2019-08-11 13:19:59 +02:00
parent 7d664837e1
commit 0a98765b44
1 changed files with 9 additions and 9 deletions

View File

@ -1,14 +1,5 @@
" Tests for the :source command.
func Test_source_sandbox()
new
call writefile(["Ohello\<Esc>"], 'Xsourcehello')
source! Xsourcehello | echo
call assert_equal('hello', getline(1))
call assert_fails('sandbox source! Xsourcehello', 'E48:')
bwipe!
endfunc
func Test_source_autocmd()
call writefile([
\ 'let did_source = 1',
@ -45,3 +36,12 @@ func Test_source_cmd()
au! SourcePre
au! SourcePost
endfunc
func Test_source_sandbox()
new
call writefile(["Ohello\<Esc>"], 'Xsourcehello')
source! Xsourcehello | echo
call assert_equal('hello', getline(1))
call assert_fails('sandbox source! Xsourcehello', 'E48:')
bwipe!
endfunc