mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 8.2.0586: Vim9: # comment not sufficiently tested
Problem: Vim9: # comment not sufficiently tested Solution: Check for preceding white space.
This commit is contained in:
@@ -1025,6 +1025,20 @@ def Test_vim9_comment()
|
||||
':# something',
|
||||
], 'E488:')
|
||||
|
||||
{ # block start
|
||||
} # block end
|
||||
CheckDefFailure([
|
||||
'{# comment',
|
||||
], 'E488:')
|
||||
CheckDefFailure([
|
||||
'{',
|
||||
'}# comment',
|
||||
], 'E488:')
|
||||
|
||||
echo "yes" # comment
|
||||
CheckDefFailure([
|
||||
'echo "yes"# comment',
|
||||
], 'E488:')
|
||||
CheckScriptSuccess([
|
||||
'vim9script',
|
||||
'echo "yes" # something',
|
||||
@@ -1041,6 +1055,29 @@ def Test_vim9_comment()
|
||||
'echo "yes" # something',
|
||||
], 'E121:')
|
||||
|
||||
exe "echo" # comment
|
||||
CheckDefFailure([
|
||||
'exe "echo"# comment',
|
||||
], 'E488:')
|
||||
CheckScriptSuccess([
|
||||
'vim9script',
|
||||
'exe "echo" # something',
|
||||
])
|
||||
CheckScriptFailure([
|
||||
'vim9script',
|
||||
'exe "echo"# something',
|
||||
], 'E121:')
|
||||
CheckDefFailure([
|
||||
'exe # comment',
|
||||
], 'E1015:')
|
||||
CheckScriptFailure([
|
||||
'vim9script',
|
||||
'exe# something',
|
||||
], 'E121:')
|
||||
CheckScriptFailure([
|
||||
'exe "echo" # something',
|
||||
], 'E121:')
|
||||
|
||||
CheckDefFailure([
|
||||
'try# comment',
|
||||
'echo "yes"',
|
||||
|
Reference in New Issue
Block a user