Mercurial > vim
diff src/testdir/test_vim9_func.vim @ 21544:6c67c86a202a v8.2.1322
patch 8.2.1322: Vim9: method on double quoted string doesn't work
Commit: https://github.com/vim/vim/commit/1040956292a9f2c3d02fc08febd5acf349c85590
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 29 20:00:38 2020 +0200
patch 8.2.1322: Vim9: method on double quoted string doesn't work
Problem: Vim9: method on double quoted string doesn't work.
Solution: Recognize double quoted string. (closes https://github.com/vim/vim/issues/6562)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 Jul 2020 20:15:03 +0200 |
parents | e87a97868bbc |
children | 1c4d4aa22b37 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -502,8 +502,11 @@ def Test_vim9script_call() assert_equal('some', var) # line starting with single quote is not a mark + # line starting with double quote can be a method call 'asdfasdf'->MyFunc() assert_equal('asdfasdf', var) + "xyz"->MyFunc() + assert_equal('xyz', var) def UseString() 'xyork'->MyFunc() @@ -511,6 +514,12 @@ def Test_vim9script_call() UseString() assert_equal('xyork', var) + def UseString2() + "knife"->MyFunc() + enddef + UseString2() + assert_equal('knife', var) + # prepending a colon makes it a mark new setline(1, ['aaa', 'bbb', 'ccc'])