comparison src/testdir/test_vim9_disassemble.vim @ 19483:0d3dcb4476ba v8.2.0299

patch 8.2.0299: Vim9: ISN_STORE with argument not tested Commit: https://github.com/vim/vim/commit/8ed04587d3cd53e29be20fde9c36e619ea7da4dc Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 22 19:07:28 2020 +0100 patch 8.2.0299: Vim9: ISN_STORE with argument not tested Problem: Vim9: ISN_STORE with argument not tested. Some cases in tv2bool() not tested. Solution: Add tests. Add test_unknown() and test_void().
author Bram Moolenaar <Bram@vim.org>
date Sat, 22 Feb 2020 19:15:04 +0100
parents b347a6c61090
children 3b026343f398
comparison
equal deleted inserted replaced
19482:5bb16fb9c9d1 19483:0d3dcb4476ba
218 \ .. 'return "yes".*' 218 \ .. 'return "yes".*'
219 \ .. ' PUSHS "yes".*' 219 \ .. ' PUSHS "yes".*'
220 \ .. ' RETURN.*' 220 \ .. ' RETURN.*'
221 \, res) 221 \, res)
222 enddef 222 enddef
223
224
225 def FuncWithDefault(arg: string = 'default'): string
226 return arg
227 enddef
228
229 def Test_disassemble_call_default()
230 let res = execute('disass FuncWithDefault')
231 assert_match('FuncWithDefault.*'
232 \ .. '\d PUSHS "default".*'
233 \ .. '\d STORE arg\[-1].*'
234 \ .. 'return arg.*'
235 \ .. '\d LOAD arg\[-1].*'
236 \ .. '\d RETURN.*'
237 \, res)
238 enddef
239
223 240
224 def HasEval() 241 def HasEval()
225 if has("eval") 242 if has("eval")
226 echo "yes" 243 echo "yes"
227 else 244 else