comparison src/testdir/test_vim9_script.vim @ 21528:e0aa9b81f6a9 v8.2.1314

patch 8.2.1314: Vim9: rule for comment after :function is confusing Commit: https://github.com/vim/vim/commit/9898107f54a330c6d9629976250a393169c698ca Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 29 14:40:25 2020 +0200 patch 8.2.1314: Vim9: rule for comment after :function is confusing Problem: Vim9: rule for comment after :function is confusing. Solution: Allow double quoted comment after :function in vim9script. (closes #6556)
author Bram Moolenaar <Bram@vim.org>
date Wed, 29 Jul 2020 14:45:05 +0200
parents a7afee13873d
children 8e278698b1fe
comparison
equal deleted inserted replaced
21527:79aeae3b041f 21528:e0aa9b81f6a9
2284 'vim9script', 2284 'vim9script',
2285 'function # comment', 2285 'function # comment',
2286 ]) 2286 ])
2287 CheckScriptFailure([ 2287 CheckScriptFailure([
2288 'vim9script', 2288 'vim9script',
2289 'function " comment',
2290 ], 'E129:')
2291 CheckScriptFailure([
2292 'vim9script',
2289 'function# comment', 2293 'function# comment',
2290 ], 'E129:') 2294 ], 'E129:')
2291 CheckScriptSuccess([ 2295 CheckScriptSuccess([
2292 'vim9script', 2296 'vim9script',
2293 'function CheckScriptSuccess # comment', 2297 'function CheckScriptSuccess # comment',
2331 2335
2332 CheckScriptSuccess([ 2336 CheckScriptSuccess([
2333 'func Test() " comment', 2337 'func Test() " comment',
2334 'endfunc', 2338 'endfunc',
2335 ]) 2339 ])
2336 CheckScriptFailure([ 2340 CheckScriptSuccess([
2337 'vim9script', 2341 'vim9script',
2338 'func Test() " comment', 2342 'func Test() " comment',
2339 'endfunc', 2343 'endfunc',
2340 ], 'E488:') 2344 ])
2341 2345
2342 CheckScriptSuccess([ 2346 CheckScriptSuccess([
2343 'def Test() # comment', 2347 'def Test() # comment',
2344 'enddef', 2348 'enddef',
2345 ]) 2349 ])