summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-09 16:05:45 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-09 16:05:45 +0100
commit730677a0dafe6f2e72888ef59f74f66f2d0a573e (patch)
treee482b72505dbf16c2743268046ad6d9fe6770f62
parent7988a6f0e9999d1103271024ab4ed26e5599de17 (diff)
downloadvim-git-730677a0dafe6f2e72888ef59f74f66f2d0a573e.tar.gz
patch 8.2.2120: not all Perl functionality is testedv8.2.2120
Problem: Not all Perl functionality is tested. Solution: Add a few more test cases. (Dominique Pellé, closes #7440)
-rw-r--r--src/testdir/test_perl.vim21
-rw-r--r--src/version.c2
2 files changed, 21 insertions, 2 deletions
diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim
index 1a856d547..c6427a71a 100644
--- a/src/testdir/test_perl.vim
+++ b/src/testdir/test_perl.vim
@@ -182,9 +182,21 @@ func Test_perleval()
call assert_equal('*VIM', perleval('"*VIM"'))
call assert_true(perleval('\\0') =~ 'SCALAR(0x\x\+)')
+
+ " typeglob
+ call assert_equal('*main::STDOUT', perleval('*STDOUT'))
+'
+ call perleval("++-$foo")
+ let messages = split(execute('message'), "\n")
+ call assert_match("Can't modify negation", messages[-1])
endfunc
func Test_perldo()
+ new
+ " :perldo in empty buffer does nothing.
+ perldo ++$counter
+ call assert_equal(0, perleval("$counter"))
+
sp __TEST__
exe 'read ' g:testname
perldo s/perl/vieux_chameau/g
@@ -204,8 +216,7 @@ func Test_perldo()
call setline(1, ['one', 'two', 'three'])
perldo VIM::DoCommand("new")
call assert_equal(wincount + 1, winnr('$'))
- bwipe!
- bwipe!
+ %bwipe!
endfunc
func Test_VIM_package()
@@ -311,4 +322,10 @@ VIM::DoCommand('let s ..= "B"')
call assert_equal('ABCDE', s)
endfunc
+func Test_perl_in_sandbox()
+ sandbox perl print 'test'
+ let messages = split(execute('message'), "\n")
+ call assert_match("'print' trapped by operation mask", messages[-1])
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index 8e2cf7837..9d09c07a0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2120,
+/**/
2119,
/**/
2118,