diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-01 14:10:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-01 14:10:13 +0200 |
commit | 6ab0953fefe31fef91e40752a675ceb60fc2fe03 (patch) | |
tree | 339bd1fc552e35f99dc7a6214170b582c1f6cbd2 | |
parent | 9e175141f3437627c314257ebf894c29c71a9ded (diff) | |
download | vim-git-6ab0953fefe31fef91e40752a675ceb60fc2fe03.tar.gz |
patch 8.2.0672: heredoc in scripts does not accept lower case markerv8.2.0672
Problem: Heredoc in scripts does not accept lower case marker.
Solution: Allow lower case only in non-Vim scripts. (Ken Takata,
closes #6019)
-rw-r--r-- | src/evalvars.c | 2 | ||||
-rw-r--r-- | src/testdir/test_lua.vim | 5 | ||||
-rw-r--r-- | src/testdir/test_perl.vim | 5 | ||||
-rw-r--r-- | src/testdir/test_python2.vim | 5 | ||||
-rw-r--r-- | src/testdir/test_python3.vim | 5 | ||||
-rw-r--r-- | src/testdir/test_pyx2.vim | 5 | ||||
-rw-r--r-- | src/testdir/test_pyx3.vim | 5 | ||||
-rw-r--r-- | src/testdir/test_ruby.vim | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
9 files changed, 31 insertions, 8 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 7c8b9f7ac..f6f077983 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -595,7 +595,7 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get) return NULL; } *p = NUL; - if (vim_islower(*marker)) + if (!script_get && vim_islower(*marker)) { emsg(_("E221: Marker cannot start with lower case letter")); return NULL; diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim index 44aae22f4..25300b67e 100644 --- a/src/testdir/test_lua.vim +++ b/src/testdir/test_lua.vim @@ -623,7 +623,10 @@ vim.command('let s ..= "B"') lua << trim vim.command('let s ..= "D"') . - call assert_equal('ABCD', s) + lua << trim eof + vim.command('let s ..= "E"') + eof + call assert_equal('ABCDE', s) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim index 35cb813a1..1a856d547 100644 --- a/src/testdir/test_perl.vim +++ b/src/testdir/test_perl.vim @@ -305,7 +305,10 @@ VIM::DoCommand('let s ..= "B"') perl << trim VIM::DoCommand('let s ..= "D"') . - call assert_equal('ABCD', s) + perl << trim eof + VIM::DoCommand('let s ..= "E"') + eof + call assert_equal('ABCDE', s) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_python2.vim b/src/testdir/test_python2.vim index 7be5b4028..ae76fe6e8 100644 --- a/src/testdir/test_python2.vim +++ b/src/testdir/test_python2.vim @@ -182,7 +182,10 @@ s+='B' python << trim s+='D' . - call assert_equal('ABCD', pyxeval('s')) + python << trim eof + s+='E' + eof + call assert_equal('ABCDE', pyxeval('s')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim index 224484611..b4a4a4aa7 100644 --- a/src/testdir/test_python3.vim +++ b/src/testdir/test_python3.vim @@ -349,7 +349,10 @@ s+='B' python3 << trim s+='D' . - call assert_equal('ABCD', pyxeval('s')) + python3 << trim eof + s+='E' + eof + call assert_equal('ABCDE', pyxeval('s')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_pyx2.vim b/src/testdir/test_pyx2.vim index 93a2b899e..7432ceba4 100644 --- a/src/testdir/test_pyx2.vim +++ b/src/testdir/test_pyx2.vim @@ -94,7 +94,10 @@ result+='B' pyx << trim result+='D' . - call assert_equal('ABCD', pyxeval('result')) + pyx << trim eof + result+='E' + eof + call assert_equal('ABCDE', pyxeval('result')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_pyx3.vim b/src/testdir/test_pyx3.vim index 5b983e40c..5d38420dc 100644 --- a/src/testdir/test_pyx3.vim +++ b/src/testdir/test_pyx3.vim @@ -94,7 +94,10 @@ result+='B' pyx << trim result+='D' . - call assert_equal('ABCD', pyxeval('result')) + pyx << trim eof + result+='E' + eof + call assert_equal('ABCDE', pyxeval('result')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_ruby.vim b/src/testdir/test_ruby.vim index 100c9ea0f..eee2831ac 100644 --- a/src/testdir/test_ruby.vim +++ b/src/testdir/test_ruby.vim @@ -409,7 +409,10 @@ Vim.command('let s ..= "B"') ruby << trim Vim.command('let s ..= "D"') . - call assert_equal('ABCD', s) + ruby << trim eof + Vim.command('let s ..= "E"') + eof + call assert_equal('ABCDE', s) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 5e35da8a0..140871cdf 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 672, +/**/ 671, /**/ 670, |