Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 21548:4e679db1c404 v8.2.1324
patch 8.2.1324: Vim9: line break after "=" does not work
Commit: https://github.com/vim/vim/commit/c7e44a7e4caedc1bc33f5c8e481109c0ae002823
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 29 21:37:43 2020 +0200
patch 8.2.1324: Vim9: line break after "=" does not work
Problem: Vim9: line break after "=" does not work.
Solution: Also allow for NUL after "=". (closes https://github.com/vim/vim/issues/6549)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 Jul 2020 21:45:04 +0200 |
parents | 8e278698b1fe |
children | b8b15e8cbf5f |
comparison
equal
deleted
inserted
replaced
21547:a24d2c2cbffd | 21548:4e679db1c404 |
---|---|
354 | 354 |
355 [v1, v2; vrem] = ['one', 'two', 'three'] | 355 [v1, v2; vrem] = ['one', 'two', 'three'] |
356 assert_equal('one', v1) | 356 assert_equal('one', v1) |
357 assert_equal('two', v2) | 357 assert_equal('two', v2) |
358 assert_equal(['three'], vrem) | 358 assert_equal(['three'], vrem) |
359 enddef | |
360 | |
361 def Test_assignment_vim9script() | |
362 let lines =<< trim END | |
363 vim9script | |
364 def Func(): list<number> | |
365 return [1, 2] | |
366 enddef | |
367 let var1: number | |
368 let var2: number | |
369 [var1, var2] = | |
370 Func() | |
371 assert_equal(1, var1) | |
372 assert_equal(2, var2) | |
373 let ll = | |
374 Func() | |
375 assert_equal([1, 2], ll) | |
376 END | |
377 CheckScriptSuccess(lines) | |
359 enddef | 378 enddef |
360 | 379 |
361 def Mess(): string | 380 def Mess(): string |
362 v:foldstart = 123 | 381 v:foldstart = 123 |
363 return 'xxx' | 382 return 'xxx' |