Mercurial > vim
annotate src/testdir/test_python3.vim @ 11186:b924ba6a4bbc
Added tag v8.0.0479 for changeset eb050472e4b4b5a3f84dd3cc46d4bada0b7f74d9
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 18 Mar 2017 21:00:05 +0100 |
parents | 27b42717662b |
children | c15bef307de6 |
rev | line source |
---|---|
10751
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for python 2 commands. |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " TODO: move tests from test88.in here. |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 if !has('python3') |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 finish |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 endif |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 func Test_py3do() |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 " Check deleting lines does not trigger an ml_get error. |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 py3 import vim |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 new |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call setline(1, ['one', 'two', 'three']) |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 py3do vim.command("%d_") |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 bwipe! |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 " Check switching to another buffer does not trigger an ml_get error. |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 new |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 let wincount = winnr('$') |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 call setline(1, ['one', 'two', 'three']) |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 py3do vim.command("new") |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 call assert_equal(wincount + 1, winnr('$')) |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 bwipe! |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 bwipe! |
27b42717662b
patch 8.0.0265: may get ml_get error when :pydo deletes lines
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 endfunc |