comparison src/testdir/test_source.vim @ 16726:fbab59a5ee6b v8.1.1365

patch 8.1.1365: source command doesn't check for the sandbox commit https://github.com/vim/vim/commit/53575521406739cf20bbe4e384d88e7dca11f040 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 22 22:38:25 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 22 May 2019 22:45:05 +0200
parents 3e2e1608efa4
children 8d91579414b8
comparison
equal deleted inserted replaced
16725:719dbc0bed23 16726:fbab59a5ee6b
34 34
35 au! SourceCmd 35 au! SourceCmd
36 au! SourcePre 36 au! SourcePre
37 au! SourcePost 37 au! SourcePost
38 endfunc 38 endfunc
39
40 func Test_source_sandbox()
41 new
42 call writefile(["Ohello\<Esc>"], 'Xsourcehello')
43 source! Xsourcehello | echo
44 call assert_equal('hello', getline(1))
45 call assert_fails('sandbox source! Xsourcehello', 'E48:')
46 bwipe!
47 endfunc