aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_source.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-08 17:43:05 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-12 05:36:33 +0800
commit27fd17a79cd2c51e71077bdd896635188ad711b5 (patch)
tree7203add5f3ae1ca1dcc32334beb5f985543cb37c /src/nvim/testdir/test_source.vim
parenteea6a4f2a0ad089e0f92dfbc54c92d88c9fea51e (diff)
downloadrneovim-27fd17a79cd2c51e71077bdd896635188ad711b5.tar.gz
rneovim-27fd17a79cd2c51e71077bdd896635188ad711b5.tar.bz2
rneovim-27fd17a79cd2c51e71077bdd896635188ad711b5.zip
vim-patch:8.2.0243: insufficient code coverage for ex_docmd.c functions
Problem: Insufficient code coverage for ex_docmd.c functions. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5618) https://github.com/vim/vim/commit/9f6277bdde97b7767ded43a0b5a2023eb601b3b7 Cherry-pick Test_window_only() from patch 8.2.0203. Cherry-pick a memory leak fix from patch 8.2.0399.
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
index b8fe8422b3..e7f3fb1884 100644
--- a/src/nvim/testdir/test_source.vim
+++ b/src/nvim/testdir/test_source.vim
@@ -57,3 +57,13 @@ func Test_different_script()
call assert_fails('source XtwoScript', 'E121:')
call delete('XtwoScript')
endfunc
+
+" When sourcing a vim script, shebang should be ignored.
+func Test_source_ignore_shebang()
+ call writefile(['#!./xyzabc', 'let g:val=369'], 'Xfile.vim')
+ source Xfile.vim
+ call assert_equal(g:val, 369)
+ call delete('Xfile.vim')
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab