mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 8.2.1268: Vim9: no error for using double quote comment
Problem: Vim9: no error for using double quote comment after :func or :def. Solution: Only accept double quote when not in Vim9 script and not after :def. (closes #6483)
This commit is contained in:
@@ -2198,6 +2198,35 @@ def Test_vim9_comment()
|
||||
'vim9script',
|
||||
'call execute("ls")# comment',
|
||||
], 'E488:')
|
||||
|
||||
CheckScriptFailure([
|
||||
'def Test() " comment',
|
||||
'enddef',
|
||||
], 'E488:')
|
||||
CheckScriptFailure([
|
||||
'vim9script',
|
||||
'def Test() " comment',
|
||||
'enddef',
|
||||
], 'E488:')
|
||||
|
||||
CheckScriptSuccess([
|
||||
'func Test() " comment',
|
||||
'endfunc',
|
||||
])
|
||||
CheckScriptFailure([
|
||||
'vim9script',
|
||||
'func Test() " comment',
|
||||
'endfunc',
|
||||
], 'E488:')
|
||||
|
||||
CheckScriptSuccess([
|
||||
'def Test() # comment',
|
||||
'enddef',
|
||||
])
|
||||
CheckScriptFailure([
|
||||
'func Test() # comment',
|
||||
'endfunc',
|
||||
], 'E488:')
|
||||
enddef
|
||||
|
||||
def Test_vim9_comment_gui()
|
||||
|
Reference in New Issue
Block a user