blob: fb98c1eda72f4a8dbbae4d03a83d424d7d4c5264 [file] [log] [blame]
Bram Moolenaara58883b2017-01-29 21:31:09 +01001" Test for python 2 commands.
2" TODO: move tests from test87.in here.
3
4if !has('python')
5 finish
6endif
7
8func Test_pydo()
9 " Check deleting lines does not trigger ml_get error.
10 py import vim
11 new
12 call setline(1, ['one', 'two', 'three'])
13 pydo vim.command("%d_")
14 bwipe!
15
16 " Check switching to another buffer does not trigger ml_get error.
17 new
18 let wincount = winnr('$')
19 call setline(1, ['one', 'two', 'three'])
20 pydo vim.command("new")
21 call assert_equal(wincount + 1, winnr('$'))
22 bwipe!
23 bwipe!
24endfunc