Imported Upstream version 8.0.586
[platform/upstream/vim.git] / src / testdir / test_python3.vim
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