vim-patch:partial:fbe4a8f: runtime(doc): Fix notation of "Vim script" and "Vim9 script" (#33673)

closes: vim/vim#17213

fbe4a8f5c0

Cherry-pick Test_source_ignore_shebang() change from patch 9.0.0363.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
This commit is contained in:
zeertzjq
2025-04-27 22:06:16 +08:00
committed by GitHub
parent 923efaea28
commit a167800f1c
5 changed files with 8 additions and 9 deletions

View File

@@ -59,12 +59,11 @@ func Test_different_script()
call assert_fails('source XtwoScript', 'E121:')
endfunc
" When sourcing a vim script, shebang should be ignored.
" 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 writefile(['#!./xyzabc', 'let g:val=369'], 'Xsisfile.vim', 'D')
source Xsisfile.vim
call assert_equal(g:val, 369)
call delete('Xfile.vim')
endfunc
" Test for expanding <sfile> in a autocmd and for <slnum> and <sflnum>
@@ -415,7 +414,7 @@ func Test_source_buffer_vim9()
source
call assert_equal(10, Xtestfunc())
" test for sourcing a vim9 script with line continuation
" test for sourcing a Vim9 script with line continuation
%d _
let lines =<< trim END
vim9script