forked from aniani/vim
patch 8.2.3307: Vim9: :echoconsole cannot access local variables
Problem: Vim9: :echoconsole cannot access local variables. Solution: Handle like other :echo commands. (closes #8708)
This commit is contained in:
@@ -2493,10 +2493,11 @@ def Test_echomsg_cmd_vimscript()
|
||||
enddef
|
||||
|
||||
def Test_echoerr_cmd()
|
||||
var local = 'local'
|
||||
try
|
||||
echoerr 'something' 'wrong' # comment
|
||||
echoerr 'something' local 'wrong' # comment
|
||||
catch
|
||||
assert_match('something wrong', v:exception)
|
||||
assert_match('something local wrong', v:exception)
|
||||
endtry
|
||||
enddef
|
||||
|
||||
@@ -2515,6 +2516,12 @@ def Test_echoerr_cmd_vimscript()
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def Test_echoconsole_cmd()
|
||||
var local = 'local'
|
||||
echoconsole 'something' local # comment
|
||||
# output goes anywhere
|
||||
enddef
|
||||
|
||||
def Test_for_outside_of_function()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
|
Reference in New Issue
Block a user