summaryrefslogtreecommitdiff
path: root/src/testdir/test_perl.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-29 22:59:12 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-29 22:59:12 +0100
commit85b5743d3e69f96882b6124d4b4ebf873ca24707 (patch)
treec2449a5ef9a093791d15119dad00140ea570e3d7 /src/testdir/test_perl.vim
parentd58f03b1c21b5b0242718f89da53ddd67b1eff6b (diff)
downloadvim-85b5743d3e69f96882b6124d4b4ebf873ca24707.zip
patch 8.0.0269: may get ml_get error when :perldo deletes lines
Problem: May get ml_get error when :perldo deletes lines or switches to another buffer. (Nikolai Pavlov, issue #1421) Solution: Check the buffer and line every time.
Diffstat (limited to 'src/testdir/test_perl.vim')
-rw-r--r--src/testdir/test_perl.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim
index da47ab153..f2b991aa7 100644
--- a/src/testdir/test_perl.vim
+++ b/src/testdir/test_perl.vim
@@ -82,6 +82,21 @@ function Test_perldo()
1
call assert_false(search('\Cperl'))
bw!
+
+ " Check deleting lines does not trigger ml_get error.
+ new
+ call setline(1, ['one', 'two', 'three'])
+ perldo VIM::DoCommand("%d_")
+ bwipe!
+
+ " Check switching to another buffer does not trigger ml_get error.
+ new
+ let wincount = winnr('$')
+ call setline(1, ['one', 'two', 'three'])
+ perldo VIM::DoCommand("new")
+ call assert_equal(wincount + 1, winnr('$'))
+ bwipe!
+ bwipe!
endfunc
function Test_VIM_package()