mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
vim-patch:8.2.0602: :unlet $VAR does not work properly (#13238)
Problem: :unlet $VAR does not work properly.
Solution: Make ":lockvar $VAR" fail. Check the "skip" flag.
7e0868efcf
Include patch 8.2.0601 changes so that ex_unletlock() can execute a callback if there are no errors.
This commit is contained in:
@@ -1393,6 +1393,20 @@ func Test_compound_assignment_operators()
|
||||
let @/ = ''
|
||||
endfunc
|
||||
|
||||
func Test_unlet_env()
|
||||
let $TESTVAR = 'yes'
|
||||
call assert_equal('yes', $TESTVAR)
|
||||
call assert_fails('lockvar $TESTVAR', 'E940')
|
||||
call assert_fails('unlockvar $TESTVAR', 'E940')
|
||||
call assert_equal('yes', $TESTVAR)
|
||||
if 0
|
||||
unlet $TESTVAR
|
||||
endif
|
||||
call assert_equal('yes', $TESTVAR)
|
||||
unlet $TESTVAR
|
||||
call assert_equal('', $TESTVAR)
|
||||
endfunc
|
||||
|
||||
func Test_funccall_garbage_collect()
|
||||
func Func(x, ...)
|
||||
call add(a:x, a:000)
|
||||
|
Reference in New Issue
Block a user