forked from aniani/vim
patch 8.1.1365: source command doesn't check for the sandbox
Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
This commit is contained in:
@@ -36,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
|
||||
|
Reference in New Issue
Block a user