summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_disassemble.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-23 22:16:53 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-23 22:16:53 +0200
commitf93c7fea084a99848d512ff2732041d4b41d93c8 (patch)
treebb6bba558d4157bb5ea1f6b2b7d0ae37cf10234f /src/testdir/test_vim9_disassemble.vim
parent1df8b3fb04ce8732a0be680273c95eb4e9f5e85d (diff)
downloadvim-git-f93c7fea084a99848d512ff2732041d4b41d93c8.tar.gz
patch 8.2.0626: Vim9: wrong syntax of function in Vim9 scriptv8.2.0626
Problem: Vim9: wrong syntax of function in Vim9 script. Solution: Give error for missing space. Implement :echomsg and :echoerr. (closes #5670)
Diffstat (limited to 'src/testdir/test_vim9_disassemble.vim')
-rw-r--r--src/testdir/test_vim9_disassemble.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index 781495278..89ca66f11 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -919,6 +919,28 @@ def Test_disassemble_execute()
res)
enddef
+def s:Echomsg()
+ echomsg 'some' 'message'
+ echoerr 'went' .. 'wrong'
+enddef
+
+def Test_disassemble_echomsg()
+ let res = execute('disass s:Echomsg')
+ assert_match('\<SNR>\d*_Echomsg.*' ..
+ "echomsg 'some' 'message'.*" ..
+ '\d PUSHS "some".*' ..
+ '\d PUSHS "message".*' ..
+ '\d ECHOMSG 2.*' ..
+ "echoerr 'went' .. 'wrong'.*" ..
+ '\d PUSHS "went".*' ..
+ '\d PUSHS "wrong".*' ..
+ '\d CONCAT.*' ..
+ '\d ECHOERR 1.*' ..
+ '\d PUSHNR 0.*' ..
+ '\d RETURN',
+ res)
+enddef
+
def SomeStringArg(arg: string)
echo arg
enddef