comparison src/testdir/test_vim9_assign.vim @ 25400:5c7192180b89 v8.2.3237

patch 8.2.3237: when a builtin function gives an error processing continues Commit: https://github.com/vim/vim/commit/327d3ee4557027b51aad86e68743a85ed3a6f52b Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 28 19:34:14 2021 +0200 patch 8.2.3237: when a builtin function gives an error processing continues Problem: When a builtin function gives an error processing continues. Solution: In Vim9 script return FAIL in get_func_tv().
author Bram Moolenaar <Bram@vim.org>
date Wed, 28 Jul 2021 19:45:04 +0200
parents 84d5cda23b34
children 747ebbce2421
comparison
equal deleted inserted replaced
25399:8c4523f3e3b4 25400:5c7192180b89
2000 ++ nr 2000 ++ nr
2001 END 2001 END
2002 CheckDefAndScriptFailure(lines, "E1202: No white space allowed after '++': ++ nr") 2002 CheckDefAndScriptFailure(lines, "E1202: No white space allowed after '++': ++ nr")
2003 enddef 2003 enddef
2004 2004
2005 def Test_abort_after_error()
2006 # should abort after strpart() fails, not give another type error
2007 var lines =<< trim END
2008 vim9script
2009 var x: string
2010 x = strpart(1, 2)
2011 END
2012 writefile(lines, 'Xtestscript')
2013 var expected = 'E1174: String required for argument 1'
2014 assert_fails('so Xtestscript', [expected, expected], 3)
2015
2016 delete('Xtestscript')
2017 enddef
2018
2019
2005 2020
2006 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker 2021 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker