mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
test_source.vim: move Test_source_sandbox
This commit is contained in:
@@ -1,14 +1,5 @@
|
|||||||
" Tests for the :source command.
|
" 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()
|
func Test_source_autocmd()
|
||||||
call writefile([
|
call writefile([
|
||||||
\ 'let did_source = 1',
|
\ 'let did_source = 1',
|
||||||
@@ -45,3 +36,12 @@ func Test_source_cmd()
|
|||||||
au! SourcePre
|
au! SourcePre
|
||||||
au! SourcePost
|
au! SourcePost
|
||||||
endfunc
|
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
|
||||||
|
Reference in New Issue
Block a user