comparison src/testdir/test_vim9_script.vim @ 21600:622021f43db1 v8.2.1350

patch 8.2.1350: Vim9: no test for error message when redefining function Commit: https://github.com/vim/vim/commit/b9a2cac3ef293bfdfe80dea6c6d16d02b7af5435 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 1 22:23:20 2020 +0200 patch 8.2.1350: Vim9: no test for error message when redefining function Problem: Vim9: no test for error message when redefining function. Solution: Add a test.
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Aug 2020 22:30:05 +0200
parents 7b5b9558500a
children 586241ee8096
comparison
equal deleted inserted replaced
21599:322067462eaf 21600:622021f43db1
1649 CheckScriptFailure(lines, 'E1073:') 1649 CheckScriptFailure(lines, 'E1073:')
1650 1650
1651 delete('XexportedFunc.vim') 1651 delete('XexportedFunc.vim')
1652 enddef 1652 enddef
1653 1653
1654 def Test_func_redefine_fails()
1655 let lines =<< trim END
1656 vim9script
1657 def Func()
1658 echo 'one'
1659 enddef
1660 def Func()
1661 echo 'two'
1662 enddef
1663 END
1664 CheckScriptFailure(lines, 'E1073:')
1665 enddef
1666
1654 def Test_fixed_size_list() 1667 def Test_fixed_size_list()
1655 # will be allocated as one piece of memory, check that changes work 1668 # will be allocated as one piece of memory, check that changes work
1656 let l = [1, 2, 3, 4] 1669 let l = [1, 2, 3, 4]
1657 l->remove(0) 1670 l->remove(0)
1658 l->add(5) 1671 l->add(5)