comparison src/testdir/test_python3.vim @ 10751:27b42717662b v8.0.0265

patch 8.0.0265: may get ml_get error when :pydo deletes lines commit https://github.com/vim/vim/commit/a58883b4ea0bbb813fd4dd7eb49dd6f03e3e5387 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 29 21:31:09 2017 +0100 patch 8.0.0265: may get ml_get error when :pydo deletes lines Problem: May get ml_get error when :pydo deletes lines or switches to another buffer. (Nikolai Pavlov, issue https://github.com/vim/vim/issues/1421) Solution: Check the buffer and line every time.
author Christian Brabandt <cb@256bit.org>
date Sun, 29 Jan 2017 21:45:04 +0100
parents
children c15bef307de6
comparison
equal deleted inserted replaced
10750:bc18332a39a1 10751:27b42717662b
1 " Test for python 2 commands.
2 " TODO: move tests from test88.in here.
3
4 if !has('python3')
5 finish
6 endif
7
8 func Test_py3do()
9 " Check deleting lines does not trigger an ml_get error.
10 py3 import vim
11 new
12 call setline(1, ['one', 'two', 'three'])
13 py3do vim.command("%d_")
14 bwipe!
15
16 " Check switching to another buffer does not trigger an ml_get error.
17 new
18 let wincount = winnr('$')
19 call setline(1, ['one', 'two', 'three'])
20 py3do vim.command("new")
21 call assert_equal(wincount + 1, winnr('$'))
22 bwipe!
23 bwipe!
24 endfunc