diff src/testdir/test_vim9_cmd.vim @ 29742:2da1753e6a4a v9.0.0211

patch 9.0.0211: invalid memory access when compiling :lockvar Commit: https://github.com/vim/vim/commit/d1d8f6bacb489036d0fd479c9dd3c0102c988889 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 14 21:28:32 2022 +0100 patch 9.0.0211: invalid memory access when compiling :lockvar Problem: Invalid memory access when compiling :lockvar. Solution: Don't read past the end of the line.
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 Aug 2022 22:30:02 +0200
parents 691c8adef6f3
children 1e9ee1b61d6d
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -1737,6 +1737,15 @@ def Test_lockvar()
       UnLockIt()
   END
   v9.CheckScriptFailure(lines, 'E46', 1)
+
+  lines =<< trim END
+      def _()
+        s:0([], s:0)
+        lockv
+      enddef
+      defcomp
+  END
+  v9.CheckScriptFailure(lines, 'E179', 2)
 enddef
 
 def Test_substitute_expr()