summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-01 14:10:13 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-01 14:10:13 +0200
commit6ab0953fefe31fef91e40752a675ceb60fc2fe03 (patch)
tree339bd1fc552e35f99dc7a6214170b582c1f6cbd2
parent9e175141f3437627c314257ebf894c29c71a9ded (diff)
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.c2
-rw-r--r--src/testdir/test_lua.vim5
-rw-r--r--src/testdir/test_perl.vim5
-rw-r--r--src/testdir/test_python2.vim5
-rw-r--r--src/testdir/test_python3.vim5
-rw-r--r--src/testdir/test_pyx2.vim5
-rw-r--r--src/testdir/test_pyx3.vim5
-rw-r--r--src/testdir/test_ruby.vim5
-rw-r--r--src/version.c2
9 files changed, 31 insertions, 8 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index 7c8b9f7acc..f6f077983b 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 44aae22f4d..25300b67ee 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 35cb813a11..1a856d5470 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 7be5b4028e..ae76fe6e89 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 2244846118..b4a4a4aa7b 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 93a2b899ea..7432ceba4a 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 5b983e40c0..5d38420dc2 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 100c9ea0fb..eee2831acf 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 5e35da8a08..140871cdf1 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,