diff src/testdir/test_vim9_disassemble.vim @ 20079:336483164ca6 v8.2.0595

patch 8.2.0595: Vim9: not all commands using ends_excmd() tested Commit: https://github.com/vim/vim/commit/a26b9700d73ebccd6c5459d0d66032a4249f6b72 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 18 19:53:28 2020 +0200 patch 8.2.0595: Vim9: not all commands using ends_excmd() tested Problem: Vim9: not all commands using ends_excmd() tested. Solution: Find # comment after regular commands. Add more tests. Report error for where it was caused.
author Bram Moolenaar <Bram@vim.org>
date Sat, 18 Apr 2020 20:00:04 +0200
parents 8fb1cf4c44d5
children 7fc5d62fe2a5
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -251,8 +251,8 @@ def Test_disassemble_pcall()
 enddef
 
 
-def FuncWithForwardCall(): string
-  return DefinedLater("yes")
+def s:FuncWithForwardCall(): string
+  return g:DefinedLater("yes")
 enddef
 
 def DefinedLater(arg: string): string
@@ -260,11 +260,11 @@ def DefinedLater(arg: string): string
 enddef
 
 def Test_disassemble_update_instr()
-  let res = execute('disass FuncWithForwardCall')
+  let res = execute('disass s:FuncWithForwardCall')
   assert_match('FuncWithForwardCall.*' ..
-        'return DefinedLater("yes").*' ..
+        'return g:DefinedLater("yes").*' ..
         '\d PUSHS "yes".*' ..
-        '\d UCALL DefinedLater(argc 1).*' ..
+        '\d UCALL g:DefinedLater(argc 1).*' ..
         '\d CHECKTYPE string stack\[-1].*' ..
         '\d RETURN.*',
         res)
@@ -272,9 +272,9 @@ def Test_disassemble_update_instr()
   " Calling the function will change UCALL into the faster DCALL
   assert_equal('yes', FuncWithForwardCall())
 
-  res = execute('disass FuncWithForwardCall')
+  res = execute('disass s:FuncWithForwardCall')
   assert_match('FuncWithForwardCall.*' ..
-        'return DefinedLater("yes").*' ..
+        'return g:DefinedLater("yes").*' ..
         '\d PUSHS "yes".*' ..
         '\d DCALL DefinedLater(argc 1).*' ..
         '\d CHECKTYPE string stack\[-1].*' ..