forked from aniani/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 #5618)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user