summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0978
blob: c4d654a223db46864f6f76b78ad0d4cbaa134c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0978
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0978
Problem:    Blob not tested with Perl.
Solution:   Add more test coverage.  Fixes a crash. (Dominique Pelle,
            closes #4037)
Files:	    src/if_perl.c, src/testdir/test_ruby.vim


*** ../vim-8.1.0977/src/if_perl.xs	2019-02-17 17:44:36.211875510 +0100
--- src/if_perl.xs	2019-02-23 15:00:57.748553084 +0100
***************
*** 1570,1576 ****
      newsv = newSVpv("0z", 2);
      for (i = 0; i < len; i++)
      {
! 	sprintf(buf, "%02X", s[i]);
  	sv_catpvn(newsv, buf, 2);
      }
      RETVAL = newsv;
--- 1570,1576 ----
      newsv = newSVpv("0z", 2);
      for (i = 0; i < len; i++)
      {
! 	sprintf(buf, "%02X", (unsigned char)(s[i]));
  	sv_catpvn(newsv, buf, 2);
      }
      RETVAL = newsv;
*** ../vim-8.1.0977/src/testdir/test_perl.vim	2018-08-02 21:46:47.579548771 +0200
--- src/testdir/test_perl.vim	2019-02-23 15:00:57.748553084 +0100
***************
*** 29,34 ****
--- 29,41 ----
    call assert_equal('abc/def/', getline('$'))
  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()
    new
    call setline(1, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
*** ../vim-8.1.0977/src/version.c	2019-02-23 14:22:59.567653374 +0100
--- src/version.c	2019-02-23 15:03:24.831570654 +0100
***************
*** 781,782 ****
--- 781,784 ----
  {   /* Add new patch number below this line */
+ /**/
+     978,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
23. You can't call your mother... she doesn't have VOIP

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///