diff src/testdir/test_vim9_cmd.vim @ 26356:0884f2be6c2a v8.2.3709

patch 8.2.3709: Vim9: backtick expression expanded when not desired Commit: https://github.com/vim/vim/commit/fad2742d538123abb9b384a053fd581f2acf6bb0 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 30 21:58:19 2021 +0000 patch 8.2.3709: Vim9: backtick expression expanded when not desired Problem: Vim9: backtick expression expanded when not desired. Solution: Only expand a backtick expression for commands that expand their argument. Remove a few outdated TODO comments.
author Bram Moolenaar <Bram@vim.org>
date Tue, 30 Nov 2021 23:00:04 +0100
parents 7e7d0e01a2d0
children 80b555c4aed0
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -206,6 +206,15 @@ def Test_folddo_backtick_expansion()
   folddoclose edit `=name`
   assert_equal('xxx', bufname())
   bwipe!
+
+  var lines =<< trim END
+      g:val = 'value'
+      def Test()
+        folddoopen echo `=g:val`
+      enddef
+      call Test()
+  END
+  CheckScriptFailure(lines, 'E15: Invalid expression: "`=g:val`"')
 enddef
 
 def Test_hardcopy_wildcards()