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.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_source.vim b/src/nvim/testdir/test_source.vim
new file mode 100644
index 0000000000..42ac0c4d0f
--- /dev/null
+++ b/src/nvim/testdir/test_source.vim
@@ -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