diff src/testdir/test_perl.vim @ 15945:f0f8754e3bf5 v8.1.0978

patch 8.1.0978: blob not tested with Perl commit https://github.com/vim/vim/commit/2472ae81dff8c30f5d63db8ad2c937deae8be646 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 23 15:04:17 2019 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 23 Feb 2019 15:15:12 +0100
parents 2d6703d4448a
children f38fcbf343ce
line wrap: on
line diff
--- a/src/testdir/test_perl.vim
+++ b/src/testdir/test_perl.vim
@@ -29,6 +29,13 @@ EOF
   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'])