mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.0978: blob not tested with Perl
Problem: Blob not tested with Perl. Solution: Add more test coverage. Fixes a crash. (Dominique Pelle, closes #4037)
This commit is contained in:
@@ -1570,7 +1570,7 @@ Blob(SV* sv)
|
|||||||
newsv = newSVpv("0z", 2);
|
newsv = newSVpv("0z", 2);
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
{
|
{
|
||||||
sprintf(buf, "%02X", s[i]);
|
sprintf(buf, "%02X", (unsigned char)(s[i]));
|
||||||
sv_catpvn(newsv, buf, 2);
|
sv_catpvn(newsv, buf, 2);
|
||||||
}
|
}
|
||||||
RETVAL = newsv;
|
RETVAL = newsv;
|
||||||
|
@@ -29,6 +29,13 @@ EOF
|
|||||||
call assert_equal('abc/def/', getline('$'))
|
call assert_equal('abc/def/', getline('$'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
funct Test_VIM_Blob()
|
||||||
|
call assert_equal('0z', perleval('VIM::Blob("")'))
|
||||||
|
call assert_equal('0z31326162', perleval('VIM::Blob("12ab")'))
|
||||||
|
call assert_equal('0z00010203', perleval('VIM::Blob("\x00\x01\x02\x03")'))
|
||||||
|
call assert_equal('0z8081FEFF', perleval('VIM::Blob("\x80\x81\xfe\xff")'))
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_buffer_Delete()
|
func Test_buffer_Delete()
|
||||||
new
|
new
|
||||||
call setline(1, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
|
call setline(1, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
|
||||||
|
@@ -779,6 +779,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
978,
|
||||||
/**/
|
/**/
|
||||||
977,
|
977,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user