diff src/testdir/test_vim9_func.vim @ 28850:338212bba072 v8.2.4948

patch 8.2.4948: cannot use Perl heredoc in nested :def function Commit: https://github.com/vim/vim/commit/d881d1598467d88808bafd2fa86982ebbca7dcc1 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 13 13:50:36 2022 +0100 patch 8.2.4948: cannot use Perl heredoc in nested :def function Problem: Cannot use Perl heredoc in nested :def function. (Virginia Senioria) Solution: Only concatenate heredoc lines when not in a nested function. (closes #10415)
author Bram Moolenaar <Bram@vim.org>
date Fri, 13 May 2022 15:00:03 +0200
parents 7fd3a9f05037
children ba083decce5d
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -4155,5 +4155,23 @@ if has('lua')
   enddef
 endif
 
+if has('perl')
+  def Test_perl_heredoc_nested()
+    var lines =<< trim END
+        vim9script
+        def F(): string
+            def G(): string
+                perl << EOF
+        EOF
+                return 'done'
+            enddef
+            return G()
+        enddef
+        assert_equal('done', F())
+    END
+    v9.CheckScriptSuccess(lines)
+  enddef
+endif
+
 
 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker