mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.0672: heredoc in scripts does not accept lower case marker
Problem: Heredoc in scripts does not accept lower case marker.
Solution: Allow lower case only in non-Vim scripts. (Ken Takata,
closes vim/vim#6019)
6ab0953fef
This commit is contained in:
parent
4bcf8c15b3
commit
2eb1f62e29
@ -214,7 +214,7 @@ list_T *heredoc_get(exarg_T *eap, char *cmd, bool script_get)
|
||||
return NULL;
|
||||
}
|
||||
*p = NUL;
|
||||
if (islower((uint8_t)(*marker))) {
|
||||
if (!script_get && islower((uint8_t)(*marker))) {
|
||||
emsg(_("E221: Marker cannot start with lower case letter"));
|
||||
return NULL;
|
||||
}
|
||||
|
@ -311,7 +311,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
|
||||
|
@ -186,7 +186,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
|
||||
|
@ -281,7 +281,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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -428,7 +428,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
|
||||
|
Loading…
Reference in New Issue
Block a user