comparison src/testdir/test_vim9_disassemble.vim @ 20091:a64c16ff98b8 v8.2.0601

patch 8.2.0601: Vim9: :unlet is not compiled Commit: https://github.com/vim/vim/commit/d72c1bf0a6784afdc8d8ceab4a007cd76d5b81e1 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 19 16:28:59 2020 +0200 patch 8.2.0601: Vim9: :unlet is not compiled Problem: Vim9: :unlet is not compiled. Solution: Implement :unlet instruction and check for errors.
author Bram Moolenaar <Bram@vim.org>
date Sun, 19 Apr 2020 16:30:04 +0200
parents 7fc5d62fe2a5
children 058b41f85bcb
comparison
equal deleted inserted replaced
20090:b2225a10b777 20091:a64c16ff98b8
121 ' STOREOPT &tabstop.*' .. 121 ' STOREOPT &tabstop.*' ..
122 '$ENVVAR = ''ev''.*' .. 122 '$ENVVAR = ''ev''.*' ..
123 ' STOREENV $ENVVAR.*' .. 123 ' STOREENV $ENVVAR.*' ..
124 '@z = ''rv''.*' .. 124 '@z = ''rv''.*' ..
125 ' STOREREG @z.*', 125 ' STOREREG @z.*',
126 res)
127 enddef
128
129 def s:ScriptFuncUnlet()
130 g:somevar = "value"
131 unlet g:somevar
132 unlet! g:somevar
133 enddef
134
135 def Test_disassemble_unlet()
136 let res = execute('disass s:ScriptFuncUnlet')
137 assert_match('<SNR>\d*_ScriptFuncUnlet.*' ..
138 'g:somevar = "value".*' ..
139 '\d PUSHS "value".*' ..
140 '\d STOREG g:somevar.*' ..
141 'unlet g:somevar.*' ..
142 '\d UNLET g:somevar.*' ..
143 'unlet! g:somevar.*' ..
144 '\d UNLET! g:somevar.*',
126 res) 145 res)
127 enddef 146 enddef
128 147
129 def s:ScriptFuncTry() 148 def s:ScriptFuncTry()
130 try 149 try