mirror of
https://github.com/neovim/neovim.git
synced 2026-01-30 00:52:52 +10:00
Problem: Source command doesn't check for the sandbox. (Armin Razmjou)
Solution: Check for the sandbox when sourcing a file.
5357552140
11 lines
266 B
VimL
11 lines
266 B
VimL
" 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
|