mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
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.
5357552140
This commit is contained in:
10
src/nvim/testdir/test_source.vim
Normal file
10
src/nvim/testdir/test_source.vim
Normal file
@@ -0,0 +1,10 @@
|
||||
" 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
|
Reference in New Issue
Block a user