aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_source.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_source.vim')
-rw-r--r--src/nvim/testdir/test_source.vim19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/nvim/testdir/test_source.vim b/src/nvim/testdir/test_source.vim
index 697b552df4..09baec0b7d 100644
--- a/src/nvim/testdir/test_source.vim
+++ b/src/nvim/testdir/test_source.vim
@@ -1,14 +1,5 @@
" 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()
call writefile([
\ 'let did_source = 1',
@@ -45,3 +36,13 @@ 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!
+ call delete('Xsourcehello')
+endfunc