comparison src/testdir/test_vim9_func.vim @ 20972:d561e3c6cd65 v8.2.1037

patch 8.2.1037: Vim9: crash when using line continuation inside :def Commit: https://github.com/vim/vim/commit/acd4c5e914f8a06745624ba585f3d06d5faf4ddd Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 22 19:39:03 2020 +0200 patch 8.2.1037: Vim9: crash when using line continuation inside :def Problem: Vim9: crash when using line continuation inside :def. Solution: Check for no more lines available.
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Jun 2020 19:45:03 +0200
parents 0653b9b72091
children d69ead03ba93
comparison
equal deleted inserted replaced
20971:d906d18f4ffb 20972:d561e3c6cd65
835 def Test_sort_return_type() 835 def Test_sort_return_type()
836 let res: list<number> 836 let res: list<number>
837 res = [1, 2, 3]->sort() 837 res = [1, 2, 3]->sort()
838 enddef 838 enddef
839 839
840 def Line_continuation_in_def(dir: string = ''): string
841 let path: string = empty(dir)
842 \ ? 'empty'
843 \ : 'full'
844 return path
845 enddef
846
847 def Test_line_continuation_in_def()
848 assert_equal('full', Line_continuation_in_def('.'))
849 enddef
850
840 851
841 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker 852 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker